Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Harden GitHub Actions #410

Merged
Merged
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
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Building
on: [push, pull_request]
permissions:
contents: read

jobs:
build:
name: Build
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ on:
schedule:
- cron: '10 6 * * 2'

permissions:
contents: read

jobs:
analyze:
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/autobuild to send a status report
name: Analyze
runs-on: ubuntu-latest

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/docs.yaml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ on:

name: Generate docs

permissions:
contents: read

jobs:
build:
permissions:
contents: write # for Git to git push
name: Release
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/goreleaser-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
branches:
- 'release-please--**'

permissions:
contents: read

jobs:
verify-goreleaser:
name: Check GoReleaser config
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: reviewdog
on: [pull_request]
permissions:
contents: read

jobs:
golangci-lint:
permissions:
checks: write # for reviewdog/action-golangci-lint to report issues using checks
contents: read # for actions/checkout to fetch code
name: golangci-lint
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/readme.yaml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ on:

name: Generate readme

permissions:
contents: read

jobs:
build:
permissions:
contents: write # for Git to git push
name: Release
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
- .github/workflows/test-install.yaml
- install.sh

permissions:
contents: read

jobs:
test-install-sh:
name: Test install.sh
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test.yaml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Testing
on: [push, pull_request]
permissions:
contents: read

jobs:
build:
name: Test
Expand Down