@@ -100,7 +100,7 @@ runs:
100
100
exit 1
101
101
shell : bash -eEuo pipefail {0}
102
102
- name : Reset path if needed
103
- run : |
103
+ run : | # zizmor: ignore[github-env] PATH is not user-controlled
104
104
# Reset path if needed
105
105
# https://github.com/pypa/gh-action-pypi-publish/issues/112
106
106
if [[ $PATH != *"/usr/bin"* ]]; then
@@ -111,25 +111,6 @@ runs:
111
111
echo "\$PATH reset. \$PATH=$PATH"
112
112
fi
113
113
shell : bash
114
- - name : Set repo and ref from which to run Docker container action
115
- id : set-repo-and-ref
116
- run : |
117
- # Set repo and ref from which to run Docker container action
118
- # to handle cases in which `github.action_` context is not set
119
- # https://github.com/actions/runner/issues/2473
120
- REF=${{ env.ACTION_REF || env.PR_REF || github.ref_name }}
121
- REPO=${{ env.ACTION_REPO || env.PR_REPO || github.repository }}
122
- REPO_ID=${{ env.PR_REPO_ID || github.repository_id }}
123
- echo "ref=$REF" >>"$GITHUB_OUTPUT"
124
- echo "repo=$REPO" >>"$GITHUB_OUTPUT"
125
- echo "repo-id=$REPO_ID" >>"$GITHUB_OUTPUT"
126
- shell : bash
127
- env :
128
- ACTION_REF : ${{ github.action_ref }}
129
- ACTION_REPO : ${{ github.action_repository }}
130
- PR_REF : ${{ github.event.pull_request.head.ref }}
131
- PR_REPO : ${{ github.event.pull_request.head.repo.full_name }}
132
- PR_REPO_ID : ${{ github.event.pull_request.base.repo.id }}
133
114
- name : Discover pre-installed Python
134
115
id : pre-installed-python
135
116
run : |
@@ -151,9 +132,26 @@ runs:
151
132
|| steps.pre-installed-python.outputs.python-path
152
133
}} '${{ github.action_path }}/create-docker-action.py'
153
134
env :
154
- REF : ${{ steps.set-repo-and-ref.outputs.ref }}
155
- REPO : ${{ steps.set-repo-and-ref.outputs.repo }}
156
- REPO_ID : ${{ steps.set-repo-and-ref.outputs.repo-id }}
135
+ # Set repo and ref from which to run Docker container action
136
+ # to handle cases in which `github.action_` context is not set
137
+ # https://github.com/actions/runner/issues/2473
138
+ REF : >-
139
+ ${{
140
+ github.action_ref
141
+ || github.event.pull_request.head.ref
142
+ || github.ref_name
143
+ }}
144
+ REPO : >-
145
+ ${{
146
+ github.action_repository
147
+ || github.event.pull_request.head.repo.full_name
148
+ || github.repository
149
+ }}
150
+ REPO_ID : >-
151
+ ${{
152
+ github.event.pull_request.base.repo.id
153
+ || github.repository_id
154
+ }}
157
155
shell : bash
158
156
- name : Run Docker container
159
157
# The generated trampoline action must exist in the allowlisted
0 commit comments