Skip to content

Commit

Permalink
CI: Fix missing explicit permissions for workflow runs
Browse files Browse the repository at this point in the history
Signed-off-by: Heathcliff <[email protected]>
  • Loading branch information
heathcliff26 committed Jan 7, 2025
1 parent df5b6b8 commit e16a44b
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,28 @@ on:
jobs:
lint:
uses: heathcliff26/ci/.github/workflows/golang-lint.yaml@main
permissions:
contents: read

unit-tests:
uses: heathcliff26/ci/.github/workflows/golang-unit-tests.yaml@main
permissions:
contents: read
with:
coveralls: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}

validate:
uses: heathcliff26/ci/.github/workflows/golang-build.yaml@main
permissions:
contents: read
with:
cache: false
cmd: "make validate"

e2e:
uses: heathcliff26/ci/.github/workflows/golang-unit-tests.yaml@main
permissions:
contents: read
needs:
- lint
- unit-tests
Expand All @@ -78,6 +86,8 @@ jobs:

build-fleetctl:
uses: heathcliff26/ci/.github/workflows/golang-build.yaml@main
permissions:
contents: read
needs:
- lint
- unit-tests
Expand Down Expand Up @@ -116,6 +126,8 @@ jobs:
build-manifests:
uses: heathcliff26/ci/.github/workflows/golang-build.yaml@main
if: ${{ github.event_name != 'pull_request' && github.event_name != 'merge_group' }}
permissions:
contents: read
needs:
- validate
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/editorconfig-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ on:
jobs:
check-editorconfig:
uses: heathcliff26/ci/.github/workflows/editorconfig-check.yaml@main
permissions:
contents: read
1 change: 1 addition & 0 deletions .github/workflows/go-testcover-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ jobs:
generate-reports:
uses: heathcliff26/ci/.github/workflows/golang-testcover-report.yaml@main
secrets: inherit
permissions: {}
with:
coveralls: true
2 changes: 1 addition & 1 deletion .github/workflows/label-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ on:

jobs:
check-labels:
uses: heathcliff26/ci/.github/workflows/label-check.yaml@main
permissions:
pull-requests: read
uses: heathcliff26/ci/.github/workflows/label-check.yaml@main
1 change: 1 addition & 0 deletions .github/workflows/link-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ jobs:
check-links:
uses: heathcliff26/ci/.github/workflows/link-check.yaml@main
secrets: inherit
permissions: {}
with:
exclude-paths: "vendor"
2 changes: 2 additions & 0 deletions .github/workflows/renovate-config-validator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ on:
jobs:
validate-renovate-config:
uses: heathcliff26/ci/.github/workflows/renovate-config-validator.yaml@main
permissions:
contents: read
2 changes: 2 additions & 0 deletions .github/workflows/renovate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ env:
jobs:
prepare:
runs-on: ubuntu-latest
permissions: {}
outputs:
dry-run: ${{ steps.config.outputs.dry-run }}
log-level: "${{ steps.config.outputs.log-level }}"
Expand All @@ -40,6 +41,7 @@ jobs:
renovate:
needs: prepare
uses: heathcliff26/ci/.github/workflows/renovate.yaml@main
permissions: {}
with:
dry-run: ${{ needs.prepare.outputs.dry-run }}
log-level: "${{ needs.prepare.outputs.log-level }}"
Expand Down

0 comments on commit e16a44b

Please sign in to comment.