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

Grant minimum permissions to github acitons workflow jobs #1577

Merged
merged 9 commits into from
Mar 27, 2025
4 changes: 4 additions & 0 deletions .github/workflows/check-eol-newrelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
jobs:
check-eol-newrelease:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
if: github.repository == 'line/line-bot-sdk-java'
steps:
- name: Check out code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/close-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
permissions:
issues: write
pull-requests: write
if: github.repository == 'line/line-bot-sdk-java'
steps:
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
with:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/create-draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ on:
jobs:
validate-input:
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Validate Acknowledgement
if: ${{ github.event.inputs.acknowledge_draft != 'Yes' }}
Expand All @@ -41,7 +42,8 @@ jobs:
create-draft-release:
runs-on: ubuntu-latest
needs: validate-input

permissions:
contents: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Fetch Latest Release
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/generate-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ on:
jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write
steps:
- name: Setup
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
name: test (JDK ${{ matrix.java }})
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pom-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ jobs:
name: test (JDK ${{ matrix.java }})
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
strategy:
fail-fast: false
matrix:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
Expand Down