Skip to content

Commit

Permalink
ci: Fix permissions for lint jobs (#22899)
Browse files Browse the repository at this point in the history
  • Loading branch information
zharinov authored Jun 20, 2023
1 parent 5b66312 commit dc43ea5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15

permissions:
actions: write

steps:
- name: Checkout code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
Expand All @@ -192,7 +195,8 @@ jobs:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.event.repository.full_name }}
run: |
gh api --method DELETE /repos/{owner}/{repo}/actions/caches?key=eslint-main-cache
gh api --method DELETE /repos/{owner}/{repo}/actions/caches?key=eslint-main-cache ||
echo "Cache not found"
- name: Save eslint cache
if: github.event_name == 'push'
Expand All @@ -206,6 +210,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 7

permissions:
actions: write

steps:
- name: Checkout code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
Expand All @@ -231,7 +238,8 @@ jobs:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.event.repository.full_name }}
run: |
gh api --method DELETE /repos/{owner}/{repo}/actions/caches?key=prettier-main-cache
gh api --method DELETE /repos/{owner}/{repo}/actions/caches?key=prettier-main-cache ||
echo "Cache not found"
- name: Save prettier cache
if: github.event_name == 'push'
Expand Down

0 comments on commit dc43ea5

Please sign in to comment.