-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 8d851bf
Showing
21 changed files
with
1,170 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
open-pull-requests-limit: 10 | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"config:base" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Copyright 2020 Wayback Archiver. All rights reserved. | ||
# Use of this source code is governed by the GNU GPL v3 | ||
# license that can be found in the LICENSE file. | ||
|
||
name: "Analysis" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: | ||
branches: [ main ] | ||
schedule: | ||
- cron: '33 23 * * 4' | ||
|
||
# Declare default permissions as read only. | ||
permissions: read-all | ||
|
||
jobs: | ||
scorecards: | ||
name: Scorecards | ||
uses: wabarc/.github/.github/workflows/reusable-scorecards.yml@main | ||
if: | | ||
github.event_name == 'pull_request' || | ||
github.ref == 'refs/heads/main' | ||
permissions: | ||
# Needed to upload the results to code-scanning dashboard. | ||
security-events: write | ||
# Used to receive a badge. (Upcoming feature) | ||
id-token: write | ||
actions: read | ||
contents: read | ||
|
||
codeql: | ||
name: CodeQL | ||
permissions: | ||
security-events: write | ||
actions: read | ||
contents: read | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'go' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] | ||
# Learn more: | ||
# https://docs.github.com/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed | ||
uses: wabarc/.github/.github/workflows/reusable-codeql.yml@main | ||
with: | ||
language: ${{ matrix.language }} | ||
|
||
nancy: | ||
name: Sonatype Nancy | ||
uses: wabarc/.github/.github/workflows/reusable-nancy.yml@main | ||
|
||
semgrep: | ||
name: Semgrep Scan | ||
if: github.actor != 'dependabot[bot]' | ||
uses: wabarc/.github/.github/workflows/reusable-semgrep.yml@main | ||
permissions: | ||
# Needed to upload the results to code-scanning dashboard. | ||
security-events: write | ||
actions: read | ||
contents: read | ||
|
||
fossa: | ||
if: github.event_name != 'pull_request' | ||
name: FOSSA | ||
uses: wabarc/.github/.github/workflows/reusable-fossa.yml@main | ||
secrets: | ||
fossa-apikey: ${{ secrets.FOSSA_APIKEY }} | ||
with: | ||
egress-policy: 'audit' | ||
|
||
dependency-review: | ||
name: Dependency Review | ||
uses: wabarc/.github/.github/workflows/reusable-dependency-review.yml@main | ||
|
||
trivy: | ||
name: Trivy | ||
uses: wabarc/.github/.github/workflows/reusable-trivy.yml@main | ||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
#actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | ||
with: | ||
scan-type: 'fs' | ||
sarif: 'filesystem.sarif' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Copyright 2020 Wayback Archiver. All rights reserved. | ||
# Use of this source code is governed by the GNU GPL v3 | ||
# license that can be found in the LICENSE file. | ||
# | ||
name: Linter | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- '**' | ||
types: [ opened, synchronize, reopened ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
super-linter: | ||
name: Super Linter | ||
uses: wabarc/.github/.github/workflows/reusable-super-linter.yml@main | ||
permissions: | ||
contents: read | ||
packages: read | ||
statuses: write | ||
|
||
golangci: | ||
name: golangci-lint | ||
uses: wabarc/.github/.github/workflows/reusable-golangci.yml@main | ||
with: | ||
egress-policy: 'audit' | ||
|
||
shellcheck: | ||
name: ShellCheck | ||
uses: wabarc/.github/.github/workflows/reusable-shellcheck.yml@main | ||
|
||
misspell: | ||
name: Misspell | ||
uses: wabarc/.github/.github/workflows/reusable-misspell.yml@main | ||
|
||
alex: | ||
name: Alex | ||
uses: wabarc/.github/.github/workflows/reusable-alex.yml@main | ||
|
||
urlcheck: | ||
name: URLCheck | ||
uses: wabarc/.github/.github/workflows/reusable-urlcheck.yml@main | ||
with: | ||
exclude-patterns: '.onion,https://github.com/,https://repo.wabarc.eu.org/,twitter.com,example.com' | ||
|
||
goreportcard: | ||
name: Go Report Card | ||
uses: wabarc/.github/.github/workflows/reusable-goreportcard.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
strategy: | ||
matrix: | ||
os: [ linux, freebsd, openbsd, dragonfly, windows, darwin ] | ||
arch: [ amd64, 386 ] | ||
include: | ||
- os: linux | ||
arch: arm | ||
arm: 5 | ||
- os: linux | ||
arch: arm | ||
arm: 6 | ||
- os: linux | ||
arch: arm | ||
arm: 7 | ||
- os: linux | ||
arch: arm64 | ||
- os: linux | ||
arch: mips | ||
mips: softfloat | ||
- os: linux | ||
arch: mips | ||
mips: hardfloat | ||
- os: linux | ||
arch: mipsle | ||
mipsle: softfloat | ||
- os: linux | ||
arch: mipsle | ||
mipsle: hardfloat | ||
- os: linux | ||
arch: mips64 | ||
- os: linux | ||
arch: mips64le | ||
- os: linux | ||
arch: ppc64 | ||
- os: linux | ||
arch: ppc64le | ||
- os: darwin | ||
arch: arm64 | ||
exclude: | ||
- os: darwin | ||
arch: 386 | ||
- os: dragonfly | ||
arch: 386 | ||
fail-fast: false | ||
uses: wabarc/.github/.github/workflows/reusable-builder-go.yml@main | ||
with: | ||
product: ghostarchive | ||
release: true | ||
go-version: '^1.22' | ||
go-os: ${{ matrix.os }} | ||
go-arch: ${{ matrix.arch }} | ||
go-arm: ${{ matrix.arm }} | ||
go-mips: ${{ matrix.mips }} | ||
go-mips64: ${{ matrix.mips64 }} | ||
go-mipsle: ${{ matrix.mipsle }} | ||
artifact-path: build/package/ghostarchive* | ||
|
||
release: | ||
name: Create and upload release | ||
needs: [ build ] | ||
permissions: | ||
contents: write | ||
uses: wabarc/.github/.github/workflows/reusable-releaser-go.yml@main | ||
with: | ||
product: ghostarchive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2020 Wayback Archiver. All rights reserved. | ||
# Use of this source code is governed by the GNU GPL v3 | ||
# license that can be found in the LICENSE file. | ||
# | ||
name: Stale | ||
|
||
on: | ||
schedule: | ||
- cron: "0 3 * * 6" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
jobs: | ||
stale: | ||
name: Stale | ||
uses: wabarc/.github/.github/workflows/reusable-stale.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Testing | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
paths: | ||
- "**/*.go" | ||
- "go.mod" | ||
- "go.sum" | ||
- ".github/workflows/testing.yml" | ||
pull_request: | ||
branches: [ main ] | ||
types: [ opened, synchronize, reopened ] | ||
paths: | ||
- "**/*.go" | ||
- "go.mod" | ||
- "go.sum" | ||
- ".github/workflows/testing.yml" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
testing: | ||
name: Testing | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
go: ["1.18", "1.19", "1.20", "1.21", "1.22" ] | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1 | ||
with: | ||
egress-policy: audit | ||
disable-telemetry: true | ||
|
||
- name: Set up Go ${{ matrix.go }} | ||
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 | ||
with: | ||
persist-credentials: false | ||
fetch-depth: 0 | ||
|
||
- name: Cache go module | ||
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11 | ||
with: | ||
path: | | ||
~/.cache/go-build | ||
~/go/pkg/mod | ||
~/Library/Caches/go-build | ||
~\AppData\Local\go-build | ||
~\go\pkg\mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Get dependencies | ||
run: | | ||
go get -v -t -d ./... | ||
- name: Run test | ||
run: | | ||
make test | ||
make test-cover | ||
- name: Upload coverage | ||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 | ||
with: | ||
name: coverage | ||
path: coverage.* | ||
|
||
- name: Run integration test | ||
run: make test-integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Wayback Archiver | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.