Skip to content

Commit b000685

Browse files
author
Vincent Moens
committed
[CI] workflow permissions
ghstack-source-id: f520a1b Pull Request resolved: #2706
1 parent 539c215 commit b000685

11 files changed

+41
-0
lines changed

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
workflow_dispatch:
1010

1111
permissions:
12+
id-token: write
1213
deployments: write
1314
contents: write
1415

.github/workflows/docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ concurrency:
1818
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && format('ci-master-{0}', github.sha) || format('ci-{0}', github.ref) }}
1919
cancel-in-progress: true
2020

21+
permissions:
22+
id-token: write
23+
contents: read
24+
2125
jobs:
2226
build-docs:
2327
strategy:

.github/workflows/lint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ concurrency:
1515
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && format('ci-master-{0}', github.sha) || format('ci-{0}', github.ref) }}
1616
cancel-in-progress: true
1717

18+
permissions:
19+
id-token: write
20+
contents: read
21+
1822
jobs:
1923
python-source-and-configs:
2024
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main

.github/workflows/nightly_build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ concurrency:
2727
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && format('ci-master-{0}', github.sha) || format('ci-{0}', github.ref) }}
2828
cancel-in-progress: true
2929

30+
permissions:
31+
id-token: write
32+
contents: read
33+
3034
jobs:
3135
build-wheel-linux:
3236
# Don't run on forked repos.

.github/workflows/test-linux-habitat.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ concurrency:
1515
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && format('ci-master-{0}', github.sha) || format('ci-{0}', github.ref) }}
1616
cancel-in-progress: true
1717

18+
permissions:
19+
id-token: write
20+
contents: read
21+
1822
jobs:
1923
tests:
2024
strategy:

.github/workflows/test-linux-libs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ concurrency:
1515
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && format('ci-master-{0}', github.sha) || format('ci-{0}', github.ref) }}
1616
cancel-in-progress: true
1717

18+
permissions:
19+
id-token: write
20+
contents: read
21+
1822
jobs:
1923

2024
unittests-atari-dqn:

.github/workflows/test-linux-rlhf.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ concurrency:
1515
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && format('ci-master-{0}', github.sha) || format('ci-{0}', github.ref) }}
1616
cancel-in-progress: true
1717

18+
permissions:
19+
id-token: write
20+
contents: read
21+
1822
jobs:
1923
unittests:
2024
strategy:

.github/workflows/test-linux-sota.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ concurrency:
1818
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && format('ci-master-{0}', github.sha) || format('ci-{0}', github.ref) }}
1919
cancel-in-progress: true
2020

21+
permissions:
22+
id-token: write
23+
contents: read
24+
2125
jobs:
2226
tests:
2327
strategy:

.github/workflows/test-linux.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ concurrency:
1818
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && format('ci-master-{0}', github.sha) || format('ci-{0}', github.ref) }}
1919
cancel-in-progress: true
2020

21+
permissions:
22+
id-token: write
23+
contents: read
24+
2125
jobs:
2226
tests-cpu:
2327
strategy:

.github/workflows/test-windows-optdepts.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ concurrency:
1515
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && format('ci-master-{0}', github.sha) || format('ci-{0}', github.ref) }}
1616
cancel-in-progress: true
1717

18+
permissions:
19+
id-token: write
20+
contents: read
21+
1822
jobs:
1923
unittests-cpu:
2024
uses: pytorch/test-infra/.github/workflows/windows_job.yml@main

.github/workflows/wheels-legacy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ concurrency:
1313
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && format('ci-master-{0}', github.sha) || format('ci-{0}', github.ref) }}
1414
cancel-in-progress: true
1515

16+
permissions:
17+
id-token: write
18+
contents: read
19+
1620
jobs:
1721

1822
build-wheel-windows:

0 commit comments

Comments
 (0)