9191 id : pr-branch-check
9292 env :
9393 GH_TOKEN : ${{secrets.GITHUB_TOKEN}}
94+ AUTOSQUASH : ${{inputs.autosquash}}
9495 run : |
9596 pr_data="$(
9697 gh api \
@@ -169,7 +170,7 @@ jobs:
169170 echo "remote=$remote"
170171 echo "node_id=$node_id"
171172 echo "requires_merge=$requires_merge"
172- echo "replace=${{ inputs.autosquash } }"
173+ echo "replace=${AUTOSQUASH }"
173174 } >> "$GITHUB_OUTPUT"
174175
175176 if "$pushable" && [[ "$fork_type" != "Organization" ]] ||
@@ -195,12 +196,14 @@ jobs:
195196 fromJson(steps.pr-branch-check.outputs.requires_merge)
196197 env :
197198 GH_TOKEN : ${{secrets.GITHUB_TOKEN}}
199+ AUTOSQUASH : ${{inputs.autosquash}}
200+ UPLOAD : ${{!inputs.autosquash}}
198201 run : |
199202 gh workflow run create-replacement-pr.yml \
200203 --ref "$GITHUB_REF_NAME" \
201204 --field pull_request="$PR" \
202- --field autosquash=${{ inputs.autosquash }} \
203- --field upload=${{ !inputs.autosquash }} \
205+ --field autosquash="${AUTOSQUASH}" \
206+ --field upload="${UPLOAD}" \
204207 --field warn_on_upload_failure=false \
205208 --field message="$INPUT_MESSAGE" \
206209 --repo "$GITHUB_REPOSITORY"
@@ -299,6 +302,8 @@ jobs:
299302 HOMEBREW_GITHUB_API_TOKEN : ${{secrets.HOMEBREW_CORE_PUBLIC_REPO_EMAIL_TOKEN}}
300303 EXPECTED_SHA : ${{needs.check.outputs.head_sha}}
301304 LARGE_RUNNER : ${{inputs.large_runner}}
305+ WARN_ON_UPLOAD_FAILURE_FLAG : ${{inputs.warn_on_upload_failure && '--warn-on-upload-failure' || ''}}
306+ MESSAGE : ${{inputs.message}}
302307 run : |
303308 local_git_head="$(git rev-parse HEAD)"
304309 remote_git_head="$(git ls-remote origin "pull/$PR/head" | cut -f1)"
@@ -330,8 +335,8 @@ jobs:
330335 --committer="$BREWTESTBOT_NAME_EMAIL" \
331336 --root-url="https://ghcr.io/v2/homebrew/core" \
332337 --retain-bottle-dir \
333- ${{inputs.warn_on_upload_failure && '--warn-on-upload-failure' || ''} } \
334- ${{inputs.message && ' --message="$INPUT_MESSAGE"' || ''} } \
338+ ${WARN_ON_UPLOAD_FAILURE_FLAG:+"${WARN_ON_UPLOAD_FAILURE_FLAG}" } \
339+ ${MESSAGE:+" --message=${MESSAGE}" } \
335340 "$PR"
336341
337342 - name : Generate build provenance
@@ -348,14 +353,16 @@ jobs:
348353 HOMEBREW_GITHUB_PACKAGES_USER : brewtestbot
349354 HOMEBREW_GITHUB_PACKAGES_TOKEN : ${{secrets.HOMEBREW_CORE_GITHUB_PACKAGES_TOKEN}}
350355 REPO_PATH : ${{steps.set-up-homebrew.outputs.repository-path}}
356+ WARN_ON_UPLOAD_FAILURE_FLAG : ${{inputs.warn_on_upload_failure && '--warn-on-upload-failure' || ''}}
351357 run : |
352358 # Don't quote arguments that might be empty; this causes errors when `brew`
353359 # interprets them as empty arguments when we want `brew` to ignore them instead.
354360 brew pr-upload \
355361 --debug \
356362 --committer="$BREWTESTBOT_NAME_EMAIL" \
357363 --root-url="https://ghcr.io/v2/homebrew/core" \
358- ${{inputs.warn_on_upload_failure && '--warn-on-upload-failure' || ''}}
364+ ${WARN_ON_UPLOAD_FAILURE_FLAG:+"${WARN_ON_UPLOAD_FAILURE_FLAG}"}
365+
359366
360367 echo "head_sha=$(git -C "$REPO_PATH" rev-parse HEAD)" >> "$GITHUB_OUTPUT"
361368
0 commit comments