Skip to content

Commit 5940138

Browse files
authored
Use GHA's self-repo syntax (#20966)
Signed-off-by: William Woodruff <[email protected]>
1 parent a451867 commit 5940138

6 files changed

Lines changed: 40 additions & 33 deletions

File tree

‎.github/workflows/check-zizmor.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ jobs:
1313
with:
1414
persist-credentials: false
1515

16-
- uses: zizmorcore/zizmor-action@6fc4b006235f201fdab3722e17240ab420d580e5 # v0.6.1
16+
- uses: zizmorcore/zizmor-action@3dc1ecc9bcb9e94e9b2c709687979e1298497054 # v0.6.2

‎.github/workflows/ci.yml‎

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ concurrency:
1414

1515
jobs:
1616
plan:
17-
uses: ./.github/workflows/plan.yml
17+
uses: $/.github/workflows/plan.yml
1818

1919
check-fmt:
20-
uses: ./.github/workflows/check-fmt.yml
20+
uses: $/.github/workflows/check-fmt.yml
2121

2222
review:
2323
needs: plan
2424
if: ${{ github.event_name == 'pull_request' && github.repository == 'astral-sh/uv' && github.event.pull_request.head.repo.full_name == github.repository && needs.plan.outputs.review-security == 'true' }}
25-
uses: ./.github/workflows/pull-request-security-review.yml
26-
secrets: inherit # zizmor: ignore[secrets-inherit] required for the automations environment, as in release.yml
25+
uses: $/.github/workflows/pull-request-security-review.yml
26+
secrets: inherit
2727
permissions:
2828
contents: read
2929
id-token: write
@@ -32,67 +32,67 @@ jobs:
3232

3333
check-lint:
3434
needs: plan
35-
uses: ./.github/workflows/check-lint.yml
35+
uses: $/.github/workflows/check-lint.yml
3636
with:
3737
code-changed: ${{ needs.plan.outputs.test-code }}
3838
save-rust-cache: ${{ needs.plan.outputs.save-rust-cache }}
3939

4040
check-docs:
4141
needs: plan
4242
if: ${{ needs.plan.outputs.run-checks == 'true' }}
43-
uses: ./.github/workflows/check-docs.yml
43+
uses: $/.github/workflows/check-docs.yml
4444
secrets: inherit
4545

4646
check-zizmor:
4747
needs: plan
4848
if: ${{ needs.plan.outputs.run-checks == 'true' }}
49-
uses: ./.github/workflows/check-zizmor.yml
49+
uses: $/.github/workflows/check-zizmor.yml
5050
permissions:
5151
contents: read
5252
security-events: write
5353

5454
check-publish:
5555
needs: plan
5656
if: ${{ needs.plan.outputs.test-code == 'true' }}
57-
uses: ./.github/workflows/check-publish.yml
57+
uses: $/.github/workflows/check-publish.yml
5858

5959
check-release:
6060
needs: plan
6161
if: ${{ needs.plan.outputs.run-checks == 'true' }}
62-
uses: ./.github/workflows/check-release.yml
62+
uses: $/.github/workflows/check-release.yml
6363

6464
check-lock:
6565
needs: plan
6666
if: ${{ needs.plan.outputs.run-checks == 'true' }}
67-
uses: ./.github/workflows/check-lock.yml
67+
uses: $/.github/workflows/check-lock.yml
6868

6969
check-generated-files:
7070
needs: plan
7171
if: ${{ needs.plan.outputs.test-code == 'true' }}
72-
uses: ./.github/workflows/check-generated-files.yml
72+
uses: $/.github/workflows/check-generated-files.yml
7373
with:
7474
schema-changed: ${{ needs.plan.outputs.check-schema }}
7575
save-rust-cache: ${{ needs.plan.outputs.save-rust-cache }}
7676

7777
test:
7878
needs: plan
7979
if: ${{ needs.plan.outputs.test-code == 'true' }}
80-
uses: ./.github/workflows/test.yml
80+
uses: $/.github/workflows/test.yml
8181
with:
8282
save-rust-cache: ${{ needs.plan.outputs.save-rust-cache }}
8383
test-macos: ${{ needs.plan.outputs.test-macos }}
8484

8585
test-windows-trampolines:
8686
needs: plan
8787
if: ${{ needs.plan.outputs.test-windows-trampoline == 'true' }}
88-
uses: ./.github/workflows/test-windows-trampolines.yml
88+
uses: $/.github/workflows/test-windows-trampolines.yml
8989
with:
9090
trampoline-build: ${{ needs.plan.outputs.test-windows-trampoline-check-binary }}
9191

9292
build-dev-binaries:
9393
needs: plan
9494
if: ${{ needs.plan.outputs.test-code == 'true' }}
95-
uses: ./.github/workflows/build-dev-binaries.yml
95+
uses: $/.github/workflows/build-dev-binaries.yml
9696
with:
9797
save-rust-cache: ${{ needs.plan.outputs.save-rust-cache }}
9898

@@ -101,7 +101,7 @@ jobs:
101101
- plan
102102
- build-dev-binaries
103103
if: ${{ needs.plan.outputs.test-smoke == 'true' }}
104-
uses: ./.github/workflows/test-smoke.yml
104+
uses: $/.github/workflows/test-smoke.yml
105105
with:
106106
sha: ${{ github.sha }}
107107

@@ -110,7 +110,7 @@ jobs:
110110
- plan
111111
- build-dev-binaries
112112
if: ${{ needs.plan.outputs.test-integration == 'true' }}
113-
uses: ./.github/workflows/test-integration.yml
113+
uses: $/.github/workflows/test-integration.yml
114114
secrets: inherit
115115
permissions:
116116
id-token: write
@@ -122,7 +122,7 @@ jobs:
122122
- plan
123123
- build-dev-binaries
124124
if: ${{ needs.plan.outputs.test-system == 'true' }}
125-
uses: ./.github/workflows/test-system.yml
125+
uses: $/.github/workflows/test-system.yml
126126
with:
127127
sha: ${{ github.sha }}
128128

@@ -131,20 +131,20 @@ jobs:
131131
- plan
132132
- build-dev-binaries
133133
if: ${{ needs.plan.outputs.test-ecosystem == 'true' }}
134-
uses: ./.github/workflows/test-ecosystem.yml
134+
uses: $/.github/workflows/test-ecosystem.yml
135135
with:
136136
sha: ${{ github.sha }}
137137

138138
build-release-binaries:
139139
needs: plan
140140
if: ${{ needs.plan.outputs.build-release-binaries == 'true' }}
141-
uses: ./.github/workflows/build-release-binaries.yml
141+
uses: $/.github/workflows/build-release-binaries.yml
142142
secrets: inherit
143143

144144
build-docker:
145145
needs: plan
146146
if: ${{ needs.plan.outputs.build-docker == 'true' }}
147-
uses: ./.github/workflows/build-docker.yml
147+
uses: $/.github/workflows/build-docker.yml
148148
with:
149149
push-dev: ${{ needs.plan.outputs.push-docker == 'true' }}
150150
secrets: inherit
@@ -157,7 +157,7 @@ jobs:
157157
bench:
158158
needs: plan
159159
if: ${{ needs.plan.outputs.run-bench == 'true' }}
160-
uses: ./.github/workflows/bench.yml
160+
uses: $/.github/workflows/bench.yml
161161
secrets: inherit
162162
with:
163163
save-rust-cache: ${{ needs.plan.outputs.save-rust-cache }}

‎.github/workflows/issue-triage.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ jobs:
198198
contents: read
199199
id-token: write
200200
issues: read
201-
uses: ./.github/workflows/reproduce-bug.yml
201+
uses: $/.github/workflows/reproduce-bug.yml
202202
with:
203203
issue: ${{ inputs.issue || github.event.issue.number }}
204204
issue-type: ${{ fromJSON(needs.triage.outputs.result).type }}
205205
runner: ubuntu-latest
206-
secrets: inherit # zizmor: ignore[secrets-inherit] -- protected environment secrets are needed for reproduction
206+
secrets: inherit

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ jobs:
118118
fail-fast: false
119119
max-parallel: 4
120120
matrix: ${{ fromJSON(needs.identify.outputs.matrix) }}
121-
uses: ./.github/workflows/rebase-conflicted-pull-request.yml
122-
secrets: inherit # zizmor: ignore[secrets-inherit] required for the automations environment, as in release.yml
121+
uses: $/.github/workflows/rebase-conflicted-pull-request.yml
122+
secrets: inherit
123123
with:
124124
number: ${{ matrix.number }}
125125
base-ref: ${{ matrix.base_ref }}

‎.github/workflows/release.yml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
needs:
118118
- plan
119119
if: ${{ needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload' || inputs.tag == 'dry-run' }}
120-
uses: ./.github/workflows/build-release-binaries.yml
120+
uses: $/.github/workflows/build-release-binaries.yml
121121
with:
122122
plan: ${{ needs.plan.outputs.val }}
123123
secrets: inherit
@@ -127,7 +127,7 @@ jobs:
127127
- plan
128128
- release-gate
129129
if: ${{ always() && needs.plan.result == 'success' && (needs.release-gate.result == 'success' || needs.release-gate.result == 'skipped') && (needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload' || inputs.tag == 'dry-run') }}
130-
uses: ./.github/workflows/build-docker.yml
130+
uses: $/.github/workflows/build-docker.yml
131131
with:
132132
plan: ${{ needs.plan.outputs.val }}
133133
secrets: inherit
@@ -280,7 +280,7 @@ jobs:
280280
- host
281281
- release-gate
282282
if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}
283-
uses: ./.github/workflows/publish-pypi.yml
283+
uses: $/.github/workflows/publish-pypi.yml
284284
with:
285285
plan: ${{ needs.plan.outputs.val }}
286286
secrets: inherit
@@ -296,7 +296,7 @@ jobs:
296296
- release-gate
297297
- publish-pypi # DIRTY: see #16989
298298
if: ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}
299-
uses: ./.github/workflows/publish-crates.yml
299+
uses: $/.github/workflows/publish-crates.yml
300300
with:
301301
plan: ${{ needs.plan.outputs.val }}
302302
secrets: inherit
@@ -381,7 +381,7 @@ jobs:
381381
# Use `always() && ...` so this job gates only on whether `publish-github`
382382
# completed successfully.
383383
if: ${{ always() && needs.publish-github.result == 'success' }}
384-
uses: ./.github/workflows/publish-docs.yml
384+
uses: $/.github/workflows/publish-docs.yml
385385
with:
386386
plan: ${{ needs.plan.outputs.val }}
387387
secrets: inherit
@@ -391,7 +391,7 @@ jobs:
391391
- plan
392392
- publish-github
393393
if: ${{ always() && needs.publish-github.result == 'success' }}
394-
uses: ./.github/workflows/publish-versions.yml
394+
uses: $/.github/workflows/publish-versions.yml
395395
with:
396396
plan: ${{ needs.plan.outputs.val }}
397397
secrets: inherit
@@ -401,7 +401,7 @@ jobs:
401401
- plan
402402
- publish-github
403403
if: ${{ always() && needs.publish-github.result == 'success' }}
404-
uses: ./.github/workflows/publish-mirror.yml
404+
uses: $/.github/workflows/publish-mirror.yml
405405
with:
406406
plan: ${{ needs.plan.outputs.val }}
407407
secrets: inherit

‎.github/zizmor.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
rules:
2+
secrets-inherit:
3+
# Disable the secrets-inherit rule entirely.
4+
# We use `secrets: inherit` pervasively in uv's CI to orchestrate reusable
5+
# workflows in various contexts/with various inputs. Removing it would
6+
# be extremely troublesome/high-risk at the moment.
7+
disable: true

0 commit comments

Comments
 (0)