Skip to content

Commit

Permalink
added permission to workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
aali309 committed Dec 5, 2023
1 parent 6c08058 commit 1de6adc
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 4 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
strategy:
matrix:
node-version: [16.x, 18.x]
permissions:
pull-requests: read
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -34,6 +36,8 @@ jobs:
strategy:
matrix:
node-version: [16.x, 18.x]
permissions:
pull-requests: read
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
Expand Down Expand Up @@ -62,6 +66,10 @@ jobs:
strategy:
matrix:
node-version: [16.x, 18.x]
permissions:
statuses: write
pull-requests: write
packages: read
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -76,6 +84,10 @@ jobs:
strategy:
matrix:
node-version: [16.x, 18.x]
permissions:
statuses: write
pull-requests: write
packages: read
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -90,7 +102,7 @@ jobs:
with:
firefox-version: latest
- name: Download geckodriver
env:
env:
GECKODRIVER_VERSION: v0.33.0
run: curl -sL https://github.com/mozilla/geckodriver/releases/download/${{env.GECKODRIVER_VERSION}}/geckodriver-${{env.GECKODRIVER_VERSION}}-linux64.tar.gz | tar xzvf -
- name: Add to PATH
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/dependent-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ on:

jobs:
check:
permissions:
issues: write
pull-requests: write
statuses: write
runs-on: ubuntu-latest
steps:
- uses: z0al/dependent-issues@v1
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/image-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ jobs:
delete-images:
name: Delete PR-scoped test images
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: r26d/[email protected]
with:
owner: ${{ github.repository_owner }}
name: cryostat-web
token: ${{ secrets.GHCR_PR_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
ignore-missing-package: true
tag-regex: pr-${{ github.event.number }}-.*
tagged-keep-latest: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Label pull request

on:
pull_request_target:
types:
types:
- opened
- reopened

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/linked-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
jobs:
verify-linked-issue:
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
name: Verify Pull Request references Issue
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
repo,
comment_id: context.payload.comment.id,
content: "+1",
});
});
checkout-branch:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-labeled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
jobs:
check-pr-label-and-comment:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: yashhy/[email protected]
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
jobs:
update_release_draft:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
# Drafts your next Release notes as Pull Requests are merged into "main"
- uses: release-drafter/release-drafter@v5
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/semantic-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
jobs:
main:
runs-on: ubuntu-latest
permissions:
pull-requests: write
statuses: write
steps:
- uses: amannn/[email protected]
env:
Expand Down

0 comments on commit 1de6adc

Please sign in to comment.