Skip to content

Commit 32869b4

Browse files
authored
Avoid creating deployments for automation jobs (astral-sh#29626)
Jobs that reference the `automations` environment create deployment records, which add noise to pull requests when reports are published. Set `deployment: false` so these jobs retain access to the environment’s secrets without creating deployment records. Co-authored-by: zaniebot <242828183+zaniebot@users.noreply.github.com>
1 parent ec891ba commit 32869b4

5 files changed

Lines changed: 24 additions & 8 deletions

File tree

‎.github/workflows/publish-pull-request-report.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ jobs:
3737
github.event.pull_request.head.repo.full_name == github.repository
3838
runs-on: github-ubuntu-24.04-x86_64-2
3939
timeout-minutes: 10
40-
environment: automations
40+
environment:
41+
name: automations
42+
deployment: false
4143
permissions:
4244
contents: read
4345
id-token: write

‎.github/workflows/pull-request-reviewers.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ jobs:
2424
github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main'
2525
runs-on: github-ubuntu-24.04-x86_64-2
2626
timeout-minutes: 10
27-
environment: automations
27+
environment:
28+
name: automations
29+
deployment: false
2830
permissions:
2931
contents: read
3032
id-token: write

‎.github/workflows/release-prepare.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ jobs:
1818
prepare-release:
1919
if: github.repository == 'astral-sh/ruff' && github.ref == 'refs/heads/main'
2020
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
21-
environment: automations
21+
environment:
22+
name: automations
23+
deployment: false
2224
permissions:
2325
contents: read
2426
id-token: write # for the credential broker

‎.github/workflows/sync-ruff-security.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ jobs:
1616
name: Sync ruff-security
1717
if: github.repository == 'astral-sh/ruff' && github.ref == 'refs/heads/main'
1818
runs-on: ${{ github.repository == 'astral-sh/ruff' && 'github-ubuntu-24.04-x86_64-4' || 'ubuntu-latest' }}
19-
environment: automations
19+
environment:
20+
name: automations
21+
deployment: false
2022
permissions:
2123
id-token: write # for the credential broker
2224
defaults:

‎.github/workflows/sync_typeshed.yaml‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ jobs:
7474
timeout-minutes: 20
7575
# Don't run the cron job on forks:
7676
if: ${{ github.repository == 'astral-sh/ruff' || github.event_name != 'schedule' }}
77-
environment: automations
77+
environment:
78+
name: automations
79+
deployment: false
7880
permissions:
7981
contents: read
8082
id-token: write # for STS
@@ -158,7 +160,9 @@ jobs:
158160
# (https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-requiring-successful-dependent-jobs)
159161
if: ${{ github.repository == 'astral-sh/ruff' || github.event_name != 'schedule' }}
160162

161-
environment: automations
163+
environment:
164+
name: automations
165+
deployment: false
162166
permissions:
163167
contents: read
164168
id-token: write # for STS
@@ -217,7 +221,9 @@ jobs:
217221
# (https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-requiring-successful-dependent-jobs)
218222
if: ${{ github.repository == 'astral-sh/ruff' || github.event_name != 'schedule' }}
219223

220-
environment: automations
224+
environment:
225+
name: automations
226+
deployment: false
221227
permissions:
222228
contents: read
223229
id-token: write # for STS
@@ -360,7 +366,9 @@ jobs:
360366
# update-snapshots is deliberately NOT included here: it shouldn't block PR creation if it fails or times out.
361367
if: ${{ always() && needs.sync.result == 'success' && needs.docstrings-windows.result == 'success' && needs.docstrings-macos.result == 'success' && (github.repository == 'astral-sh/ruff' || github.event_name != 'schedule') }}
362368

363-
environment: automations
369+
environment:
370+
name: automations
371+
deployment: false
364372
permissions:
365373
contents: read
366374
id-token: write # for STS

0 commit comments

Comments
 (0)