2727 cache_application_id :
2828 type : string
2929 required : true
30+ cache_environment :
31+ # GitHub environment for the `upload_cache` job. Its only role is to fix the
32+ # OIDC `sub` claim to `...:environment:<name>`, which the Azure cache app's
33+ # federated credential is scoped to; it must match the writer `cache_application_id`.
34+ type : string
35+ required : true
3036
3137env :
3238 # Disable Lake's automatic fetching of cloud builds.
8995
9096 # Checkout a trusted branch to build the tooling from
9197 - name : Checkout tools branch
92- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
98+ uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
9399 with :
94100 # Recall that on the `leanprover-community/mathlib4-nightly-testing` repository,
95101 # we don't maintain a `master` branch at all.
99105 path : tools-branch
100106
101107 - name : Checkout local actions
102- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
108+ uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
103109 with :
104110 ref : ${{ github.workflow_sha }}
105111 fetch-depth : 1
@@ -122,7 +128,7 @@ jobs:
122128
123129 # Checkout the PR branch into a subdirectory
124130 - name : Checkout PR branch
125- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
131+ uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
126132 with :
127133 ref : ${{ inputs.pr_branch_ref }}
128134 fetch-depth : 2 # we may fetch cache from the commit before this one (or earlier)
@@ -577,7 +583,7 @@ jobs:
577583 - name : Generate lean-pr-testing app token
578584 if : ${{ always() && github.repository == 'leanprover-community/mathlib4-nightly-testing' && (startsWith(github.ref_name, 'lean-pr-testing-') || startsWith(github.ref_name, 'batteries-pr-testing-')) }}
579585 id : lean-pr-testing-token
580- uses : actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
586+ uses : actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
581587 with :
582588 # `batteries-pr-testing-*` branches need a token scoped to `leanprover-community/batteries`
583589 # for the labelling API; `lean-pr-testing-*` branches need one scoped to `leanprover/lean4`.
@@ -608,6 +614,10 @@ jobs:
608614 name : Upload to cache
609615 needs : [build]
610616 runs-on : ubuntu-latest # These steps run on a GitHub runner; no landrun sandboxing is needed.
617+ # Pins the OIDC `sub` claim to `...:environment:<cache_environment>`, which the Azure cache
618+ # app's federated credential is scoped to. A token minted by any job without this environment
619+ # (e.g. the untrusted build/post_steps/style_lint jobs) cannot satisfy that trust.
620+ environment : ${{ inputs.cache_environment }}
611621 permissions :
612622 contents : read
613623 id-token : write
@@ -617,7 +627,7 @@ jobs:
617627 if : ${{ always() && needs.build.outputs.cache-staging-has-files == 'true' }}
618628 steps :
619629 - name : Checkout tools branch
620- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
630+ uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
621631 with :
622632 ref : ${{ inputs.tools_branch_ref != '' && inputs.tools_branch_ref || (github.repository == 'leanprover-community/mathlib4-nightly-testing' && 'nightly-testing-green' || 'master') }}
623633 fetch-depth : 1
@@ -693,7 +703,7 @@ jobs:
693703 contents : read
694704 steps :
695705
696- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
706+ - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
697707 with :
698708 ref : ${{ inputs.pr_branch_ref }}
699709 # Untrusted (potentially fork) checkout: don't persist the GITHUB_TOKEN into its .git/config.
@@ -743,7 +753,7 @@ jobs:
743753 lake exe graph
744754
745755 - name : Checkout local actions
746- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
756+ uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
747757 with :
748758 ref : ${{ github.workflow_sha }}
749759 fetch-depth : 1
@@ -908,7 +918,7 @@ jobs:
908918 steps.get-label-actor.outputs.username != 'mathlib-update-dependencies' &&
909919 steps.get-label-actor.outputs.username != 'mathlib-splicebot'
910920 name: check team membership
911- uses: tspascoal/get-user-teams-membership@818140d631d5f29f26b151afbe4179f87d9ceb5e # v4.0.1
921+ uses: tspascoal/get-user-teams-membership@b2546c5affc730fd8e3d8483ae9ad3621938c2f9 # v4.0.2
912922 id: actorTeams
913923 with:
914924 organization: leanprover-community # optional. Default value ${{ github.repository_owner }}
@@ -927,7 +937,7 @@ jobs:
927937 contains(steps.actorTeams.outputs.teams, 'bot-users')
928938 )
929939 name: If `auto-merge-after-CI` is present, add a `bors merge` comment.
930- uses: GrantBirki/comment@608e41b19bc973020ec0e189ebfdae935d7fe0cc # v2.1.1
940+ uses: GrantBirki/comment@3439715f0cf3b8fc29bf47be0e3226679c06c41a # v3.0.0
931941 with:
932942 # This token is masked by the token minting action and will not be logged accidentally.
933943 token: ${{ steps.auto-merge-app-token.outputs.token }}
0 commit comments