Skip to content

Commit ffd5da5

Browse files
authored
[CI] Update all workflows with permissions (#13672)
update
1 parent 42a46e4 commit ffd5da5

22 files changed

Lines changed: 69 additions & 0 deletions

.github/workflows/benchmark.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
schedule:
66
- cron: "30 1 1,15 * *" # every 2 weeks on the 1st and the 15th of every month at 1:30 AM
77

8+
permissions:
9+
contents: read
10+
811
env:
912
DIFFUSERS_IS_CI: yes
1013
HF_XET_HIGH_PERFORMANCE: 1

.github/workflows/build_docker_images.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ concurrency:
1414
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1515
cancel-in-progress: true
1616

17+
permissions:
18+
contents: read
19+
1720
env:
1821
REGISTRY: diffusers
1922
CI_SLACK_CHANNEL: ${{ secrets.CI_DOCKER_CHANNEL }}
@@ -23,6 +26,9 @@ jobs:
2326
runs-on:
2427
group: aws-general-8-plus
2528
if: github.event_name == 'pull_request'
29+
permissions:
30+
contents: read
31+
pull-requests: read
2632
steps:
2733
- name: Set up Docker Buildx
2834
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3

.github/workflows/build_documentation.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ on:
1212
- "examples/**"
1313
- "docs/**"
1414

15+
permissions:
16+
contents: read
17+
1518
jobs:
1619
build:
1720
uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@2430c1ec91d04667414e2fa31ecfc36c153ea391 # main

.github/workflows/build_pr_documentation.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ concurrency:
1111
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1212
cancel-in-progress: true
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
check-links:
1619
runs-on: ubuntu-latest

.github/workflows/mirror_community_pipeline.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ on:
2020
required: true
2121
default: 'main'
2222

23+
permissions:
24+
contents: read
25+
2326
jobs:
2427
mirror_community_pipeline:
2528
env:

.github/workflows/nightly_tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
schedule:
66
- cron: "0 0 * * *" # every day at midnight
77

8+
permissions:
9+
contents: read
10+
811
env:
912
DIFFUSERS_IS_CI: yes
1013
HF_XET_HIGH_PERFORMANCE: 1

.github/workflows/notify_slack_about_release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
release:
66
types: [published]
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
build:
1013
runs-on: ubuntu-22.04

.github/workflows/pr_dependency_test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ concurrency:
1515
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1616
cancel-in-progress: true
1717

18+
permissions:
19+
contents: read
20+
1821
jobs:
1922
check_dependencies:
2023
runs-on: ubuntu-22.04

.github/workflows/pr_modular_tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ concurrency:
2525
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
2626
cancel-in-progress: true
2727

28+
permissions:
29+
contents: read
30+
2831
env:
2932
DIFFUSERS_IS_CI: yes
3033
HF_XET_HIGH_PERFORMANCE: 1

.github/workflows/pr_test_fetcher.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Fast tests for PRs - Test Fetcher
22

33
on: workflow_dispatch
44

5+
permissions:
6+
contents: read
7+
58
env:
69
DIFFUSERS_IS_CI: yes
710
OMP_NUM_THREADS: 4

0 commit comments

Comments
 (0)