Skip to content

Commit

Permalink
workflows: fix autosquash
Browse files Browse the repository at this point in the history
We'll be generating commits when autosquashing, so we still need these.

Also, let's only generate the build provenance in
`create-replacement-pr` whenever we're uploading.
  • Loading branch information
carlocab committed May 18, 2024
1 parent 3e40676 commit 4d2a19a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/create-replacement-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ jobs:
id: pr-pull
working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}
env:
BREWTESTBOT_NAME_EMAIL: "BrewTestBot <[email protected]>"
HOMEBREW_GPG_PASSPHRASE: ${{ inputs.autosquash && secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY_PASSPHRASE }}
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_CORE_PUBLIC_REPO_EMAIL_TOKEN }}
MESSAGE: ${{ inputs.message }}
run: |
Expand All @@ -165,6 +167,7 @@ jobs:
--debug \
--branch-okay \
--workflows=tests.yml \
--committer="$BREWTESTBOT_NAME_EMAIL" \
--root-url="https://ghcr.io/v2/homebrew/core" \
${{ inputs.autosquash && '--autosquash' || '--clean --no-cherry-pick' }} \
${{ inputs.message && '--message="$MESSAGE"' || '' }} \
Expand All @@ -174,6 +177,7 @@ jobs:
uses: actions/attest-build-provenance@v1
with:
subject-path: '${{steps.pr-pull.outputs.bottle_path}}/*.tar.gz'
if: inputs.upload

- name: Upload bottles to GitHub Packages
id: pr-upload
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/publish-commit-bottles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ jobs:
id: pr-pull
working-directory: ${{steps.set-up-homebrew.outputs.repository-path}}
env:
BREWTESTBOT_NAME_EMAIL: "BrewTestBot <[email protected]>"
HOMEBREW_GPG_PASSPHRASE: ${{ inputs.autosquash && secrets.BREWTESTBOT_GPG_SIGNING_SUBKEY_PASSPHRASE }}
HOMEBREW_GITHUB_API_TOKEN: ${{secrets.HOMEBREW_CORE_PUBLIC_REPO_EMAIL_TOKEN}}
EXPECTED_SHA: ${{needs.check.outputs.head_sha}}
LARGE_RUNNER: ${{inputs.large_runner}}
Expand Down Expand Up @@ -322,6 +324,7 @@ jobs:
--clean \
--no-cherry-pick \
--workflows=tests.yml \
--committer="$BREWTESTBOT_NAME_EMAIL" \
--root-url="https://ghcr.io/v2/homebrew/core" \
--retain-bottle-dir \
${{inputs.warn_on_upload_failure && '--warn-on-upload-failure' || ''}} \
Expand Down

0 comments on commit 4d2a19a

Please sign in to comment.