Skip to content

Commit

Permalink
Merge pull request #3140 from AlchemyCMS/backport/7.3-stable/pr-3139
Browse files Browse the repository at this point in the history
[7.3-stable] CI: Set workflow permissions
  • Loading branch information
tvdeyen authored Jan 8, 2025
2 parents be4cab2 + 21a0886 commit db31ba7
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- closed
- labeled

permissions:
pull-requests: write

jobs:
backport:
name: Backport
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/brakeman-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ concurrency:
group: brakeman-${{ github.ref_name }}
cancel-in-progress: ${{ github.ref_name != 'main' }}

permissions:
contents: read
security-events: write

on:
push:
branches:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ on:

jobs:
check_bun_lock:
permissions:
contents: read
runs-on: ubuntu-22.04
name: Check bun.lockdb
steps:
Expand All @@ -27,6 +29,8 @@ jobs:
bun_lock_changed: ${{ steps.changed-bun-lock.outputs.any_changed }}

build_javascript:
permissions:
contents: read
runs-on: ubuntu-22.04
name: Build JS packages
needs: check_bun_lock
Expand All @@ -52,6 +56,8 @@ jobs:
path: vendor/javascript

RSpec:
permissions:
contents: read
needs: [check_bun_lock, build_javascript]
if: ${{ success('check_bun_lock') && !failure('build_javascript') }}
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -161,6 +167,8 @@ jobs:
spec/dummy/tmp/screenshots
PushJavascript:
permissions:
contents: write
runs-on: ubuntu-22.04
needs: [check_bun_lock, RSpec]
if: github.event_name == 'pull_request'
Expand Down Expand Up @@ -193,6 +201,8 @@ jobs:
branch: ${{ github.head_ref }}

Jest:
permissions:
contents: read
runs-on: ubuntu-22.04
env:
NODE_ENV: test
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ concurrency:
group: lint-${{ github.ref_name }}
cancel-in-progress: ${{ github.ref_name != 'main' }}

permissions:
contents: read

jobs:
Standard:
runs-on: ubuntu-22.04
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ on:
schedule:
- cron: "0 0 * * *"

permissions:
pull-requests: write
issues: write

jobs:
stale:
runs-on: ubuntu-22.04

steps:
- uses: actions/stale@v5
with:
Expand Down

0 comments on commit db31ba7

Please sign in to comment.