Skip to content

Commit c54a604

Browse files
authored
Merge pull request #244 from github/aeisenberg/permissions
Add permissions blocks to all workflows
2 parents d03c783 + f00e9cc commit c54a604

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.github/workflows/check-submodule-pointers.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414
schedule:
1515
- cron: '42 12 * * *'
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
check-submodules:
1922
runs-on: ubuntu-latest
@@ -22,13 +25,13 @@ jobs:
2225
- uses: actions/checkout@v3
2326

2427
- name: Compare submodule pointers to lgtm.com branch
25-
env:
28+
env:
2629
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2730
run: |
2831
CODEQL_ACTUAL_SHA="$(git rev-parse @:./ql)"
2932
CODEQL_EXPECTED_SHA="$(gh api repos/github/codeql/git/ref/heads/lgtm.com --jq '.object.sha')"
3033
echo "The ql submodule currently points to $CODEQL_ACTUAL_SHA. The tip of the lgtm.com branch of github/codeql is $CODEQL_EXPECTED_SHA."
31-
if [ "$CODEQL_EXPECTED_SHA" != "$CODEQL_ACTUAL_SHA" ]; then
34+
if [ "$CODEQL_EXPECTED_SHA" != "$CODEQL_ACTUAL_SHA" ]; then
3235
echo "::error:: The ql submodule is out of date with the lgtm.com branch of github/codeql. Expected $CODEQL_EXPECTED_SHA, found $CODEQL_ACTUAL_SHA."
3336
exit 1
3437
fi

.github/workflows/mirror-main-to-master.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
push:
77
branches: [ main ]
88

9+
permissions:
10+
contents: write
11+
912
jobs:
1013
mirror-main-to-master:
1114
runs-on: ubuntu-latest

.github/workflows/report-failure.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
issues: write
1616
steps:
1717
- name: Create issue
18-
env:
18+
env:
1919
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2020
WORKFLOW_RUN_URL: ${{ github.event.workflow_run.html_url }}
2121
run: |
@@ -24,4 +24,3 @@ jobs:
2424
--repo "$GITHUB_REPOSITORY" \
2525
--title "Submodule pointers out of date: $TODAY" \
2626
--body "Submodule pointer check failed: $WORKFLOW_RUN_URL"
27-

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy