Skip to content

Commit

Permalink
Continue limiting workflow permissions (#7092)
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg authored Feb 10, 2025
1 parent 0644948 commit 00f0043
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build:
name: Build
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/generate-post-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Generate Post-Release PR
on:
workflow_dispatch:

permissions:
contents: read

jobs:
prereqs:
runs-on: ubuntu-latest
Expand All @@ -15,6 +18,8 @@ jobs:
fi
create-pull-request-against-main:
permissions:
contents: write # for git push to PR branch
runs-on: ubuntu-latest
needs:
- prereqs
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/prepare-patch-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ name: Prepare patch release
on:
workflow_dispatch:

permissions:
contents: read

jobs:
prepare-patch-release:
permissions:
contents: write # for git push to PR branch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/prepare-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Prepare release branch
on:
workflow_dispatch:

permissions:
contents: read

jobs:
prereqs:
runs-on: ubuntu-latest
Expand All @@ -21,6 +24,8 @@ jobs:
fi
create-pull-request-against-release-branch:
permissions:
contents: write # for git push to PR branch
runs-on: ubuntu-latest
needs:
- prereqs
Expand Down Expand Up @@ -70,6 +75,8 @@ jobs:
--base $RELEASE_BRANCH_NAME
create-pull-request-against-main:
permissions:
contents: write # for git push to PR branch
runs-on: ubuntu-latest
needs:
- prereqs
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ name: Release
on:
workflow_dispatch:

permissions:
contents: read

jobs:
release:
permissions:
contents: write # for creating the release
runs-on: ubuntu-24.04
outputs:
version: ${{ steps.create-github-release.outputs.version }}
Expand Down Expand Up @@ -126,6 +131,8 @@ jobs:
echo "version=$VERSION" >> $GITHUB_OUTPUT
merge-change-log-to-main:
permissions:
contents: write # for git push to PR branch
runs-on: ubuntu-latest
needs:
- release
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/reusable-open-issue-on-failure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ name: Reusable - Open issue on workflow failure
on:
workflow_call:

permissions:
contents: read

jobs:
open-issue:
permissions:
contents: read
issues: write # for creating the issue
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down

0 comments on commit 00f0043

Please sign in to comment.