Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
schedule:
- cron: "0 0 * * 1"

permissions:
contents: read

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ["go"]
# CodeQL supports [ $supported-codeql-languages ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@ce64ddcb0d8d890d2df4a9d1c04ff297367dea2a # v3.35.2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@ce64ddcb0d8d890d2df4a9d1c04ff297367dea2a # v3.35.2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@ce64ddcb0d8d890d2df4a9d1c04ff297367dea2a # v3.35.2
with:
category: "/language:${{matrix.language}}"
9 changes: 7 additions & 2 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@
dependency-review:
runs-on: ubuntu-24.04
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0

Check warning on line 19 in .github/workflows/dependency-review.yml

View workflow job for this annotation

GitHub Actions / Yamllint

too few spaces before comment
with:
egress-policy: audit

- name: 'Checkout Repository'
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

Check warning on line 24 in .github/workflows/dependency-review.yml

View workflow job for this annotation

GitHub Actions / Yamllint

too few spaces before comment
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0

Check warning on line 26 in .github/workflows/dependency-review.yml

View workflow job for this annotation

GitHub Actions / Yamllint

too few spaces before comment
28 changes: 19 additions & 9 deletions .github/workflows/go-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,25 @@ jobs:
name: Stable
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: arnested/go-version-action@v2
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: arnested/go-version-action@6343454db06c63467680c5dc1f4f382fe9fe6303 # v2.1.2
id: go-version
with:
patch-level: true
- name: Setup Go ${{ steps.go-version.outputs.latest }}
uses: arnested/setup-go@rc
uses: arnested/setup-go@27a670ec1a85aa0757dce6658ff5bfdce62f4d06 # rc
with:
go-version: ${{ steps.go-version.outputs.latest }}
- run: go mod edit -go ${{ steps.go-version.outputs.latest }}
- run: go fix ./...
- run: git diff
- name: "Create pull request"
uses: peter-evans/create-pull-request@v8
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
commit-message: |
Update Go version to ${{ steps.go-version.outputs.latest }}
Expand All @@ -44,12 +49,17 @@ jobs:
name: Unstable
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: arnested/go-version-action@v2
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: arnested/go-version-action@6343454db06c63467680c5dc1f4f382fe9fe6303 # v2.1.2
id: go-version-stable
with:
patch-level: true
- uses: arnested/go-version-action@v2
- uses: arnested/go-version-action@6343454db06c63467680c5dc1f4f382fe9fe6303 # v2.1.2
id: go-version-unstable
with:
patch-level: true
Expand All @@ -62,7 +72,7 @@ jobs:
echo "URL=https://tip.golang.org/doc/go$(sed -E 's/([0-9]+\.[0-9]+).*/\1/' <<< '${{ steps.go-version-unstable.outputs.latest }}')" >> $GITHUB_OUTPUT
- name: Setup Go ${{ steps.go-version-unstable.outputs.latest }}
if: steps.go-version-unstable.outputs.latest != steps.go-version-stable.outputs.latest
uses: arnested/setup-go@rc
uses: arnested/setup-go@27a670ec1a85aa0757dce6658ff5bfdce62f4d06 # rc
with:
go-version: ${{ steps.go-version-unstable.outputs.latest }}
- run: go mod edit -go ${{ steps.go-version-unstable.outputs.latest }}
Expand All @@ -72,7 +82,7 @@ jobs:
- run: git diff
if: steps.go-version-unstable.outputs.latest != steps.go-version-stable.outputs.latest
- name: "Create pull request"
uses: peter-evans/create-pull-request@v8
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
draft: true
commit-message: |
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ jobs:
name: Lint
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Go
uses: arnested/setup-go@rc
uses: arnested/setup-go@27a670ec1a85aa0757dce6658ff5bfdce62f4d06 # rc
with:
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
version: latest
install-mode: goinstall
Expand Down
27 changes: 21 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,36 @@ jobs:
actionlint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: reviewdog/action-actionlint@v1
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: reviewdog/action-actionlint@6fb7acc99f4a1008869fa8a0f09cfca740837d9d # v1.72.0
markdownlint:
name: markdown
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run markdownlint
uses: DavidAnson/markdownlint-cli2-action@v23
uses: DavidAnson/markdownlint-cli2-action@ce4853d43830c74c1753b39f3cf40f71c2031eb9 # v23.0.0
yamllint:
name: Yamllint
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run Yamllint
uses: frenck/action-yamllint@v1.5.0
uses: frenck/action-yamllint@34b4bbcaeabedcfefad6adea8c5bbc42af0e2d47 # v1.5.0
with:
strict: true
44 changes: 32 additions & 12 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ jobs:
name: Check generated code is up to date
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Go
uses: arnested/setup-go@rc
uses: arnested/setup-go@27a670ec1a85aa0757dce6658ff5bfdce62f4d06 # rc
with:
go-version-file: go.mod
- name: go mod tidy
Expand All @@ -25,11 +30,16 @@ jobs:
name: Build and test
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Setup Go
uses: arnested/setup-go@rc
uses: arnested/setup-go@27a670ec1a85aa0757dce6658ff5bfdce62f4d06 # rc
with:
go-version-file: go.mod
- name: go version
Expand All @@ -43,22 +53,22 @@ jobs:
go fmt ./...
git diff --exit-code
- name: Test
uses: robherley/go-test-action@v1.0.0
uses: robherley/go-test-action@72d31c2e7a3502ad0639274dcdc7ffbc7c9c6c4c # v1.0.0
with:
testArguments: -race -shuffle=on -benchtime=1x -cover -covermode=atomic -coverprofile=coverage.txt ./...
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v6
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Install changelog management tool
run: go install github.com/goreleaser/chglog/cmd/chglog@main
- name: Build changelog
run: chglog init
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v7
uses: goreleaser/goreleaser-action@e24998b8b67b290c2fa8b7c14fcfa7de2c5c9b8c # v7.1.0
with:
args: release --snapshot
- uses: actions/upload-artifact@v7
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: Debian packages
path: dist/*.deb
Expand All @@ -67,11 +77,16 @@ jobs:
name: Nilaway
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Setup Go
uses: arnested/setup-go@rc
uses: arnested/setup-go@27a670ec1a85aa0757dce6658ff5bfdce62f4d06 # rc
with:
go-version-file: go.mod
- name: Install nilaway
Expand All @@ -83,9 +98,14 @@ jobs:
name: License check
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Go
uses: arnested/setup-go@rc
uses: arnested/setup-go@27a670ec1a85aa0757dce6658ff5bfdce62f4d06 # rc
with:
go-version-file: go.mod
- name: Install wwhrd
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ jobs:
bump-version:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0
with:
egress-policy: audit

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- uses: arnested/go-version-action@v2
- uses: arnested/go-version-action@6343454db06c63467680c5dc1f4f382fe9fe6303 # v2.1.2
id: go-version
- name: Bump version and push tag
uses: anothrNick/github-tag-action@1.75.0
uses: anothrNick/github-tag-action@4ed44965e0db8dab2b466a16da04aec3cc312fd8 # 1.75.0
id: version
env:
GITHUB_TOKEN: ${{ github.token }}
Expand All @@ -27,7 +32,7 @@ jobs:
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
RELEASE_BRANCHES: main
- name: Setup Go
uses: arnested/setup-go@rc
uses: arnested/setup-go@27a670ec1a85aa0757dce6658ff5bfdce62f4d06 # rc
with:
go-version-file: go.mod
- name: go version
Expand All @@ -39,7 +44,7 @@ jobs:
- name: Build changelog
run: chglog init
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v7
uses: goreleaser/goreleaser-action@e24998b8b67b290c2fa8b7c14fcfa7de2c5c9b8c # v7.1.0
with:
args: release
env:
Expand Down Expand Up @@ -70,7 +75,7 @@ jobs:
working-directory: site
env:
GH_TOKEN: ${{ github.token }}
- uses: BaileyJM02/markdown-to-pdf@v1.2.0
- uses: BaileyJM02/markdown-to-pdf@1be26775add5f94fb55d4a2ce36ff7cad23b8dd0 # v1.2.0
with:
input_path: index.md
output_dir: site/
Expand All @@ -90,15 +95,15 @@ jobs:
- name: Add .well-known for Bluesky to GitHub Pages
run: cp -vR page/.well-known site/
- name: Deploy deb packages
uses: JamesIves/github-pages-deploy-action@v4
uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0
with:
branch: gh-pages
folder: site
clean: true
single-commit: true
- name: Post status to Google Chat
if: ${{ always() }}
uses: containrrr/shoutrrr-action@v1
uses: containrrr/shoutrrr-action@a478c36b6a37012a65dc756032c4367b3221768d # v1.0.98
with:
url: "${{ secrets.WATCHTOWER_NOTIFICATION_URL }}"
message: "Released `${{ github.repository }}`@`${{ github.sha }}` as ${{ steps.version.outputs.tag }}: *${{ job.status }}*."
Loading
Loading