Skip to content

Commit

Permalink
ci: specify higher permissions on a job level
Browse files Browse the repository at this point in the history
  • Loading branch information
galargh committed Apr 2, 2024
1 parent e78add6 commit b3c24ac
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 16 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
permissions: {}

jobs:
build:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/builtin-actor-tests.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: Built-in Actors

on:
push:
paths:
- build/actors
- build/builtin_actors_gen.go
branches:
- release/*

permissions: {}

jobs:
release:
name: Release Tests
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
permissions: {}

jobs:
check-docsgen:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
permissions: {}

jobs:
docker:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
# This enables the workflow to create GitHub releases
contents: write
permissions: {}

jobs:
build:
Expand Down Expand Up @@ -68,6 +66,9 @@ jobs:
lotus-worker
release:
name: Release [publish=${{ startsWith(github.ref, 'refs/tags/') }}]
permissions:
# This enables the job to create and/or update GitHub releases
contents: write
runs-on: ubuntu-latest
needs: [build]
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
schedule:
- cron: '0 12 * * *'

permissions: {}

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/sync-master-main.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name: sync-master-main

on:
push:
branches:
- master

permissions:
contents: write
permissions: {}

jobs:
sync:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
permissions: {}

jobs:
discover:
Expand Down

0 comments on commit b3c24ac

Please sign in to comment.