Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork185
Publish and commit bottles#5029
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
| name:Publish and commit bottles | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| pull_request: | |
| description:Pull request number | |
| required:true | |
| large_runner: | |
| description:"Run the upload job on a large runner? (default: false)" | |
| type:boolean | |
| required:false | |
| default:false | |
| autosquash: | |
| description:"Squash pull request commits according to Homebrew style? (default: false)" | |
| type:boolean | |
| required:false | |
| default:false | |
| warn_on_upload_failure: | |
| description:"Pass `--warn-on-upload-failure` to `brew pr-pull`? (default: false)" | |
| type:boolean | |
| required:false | |
| default:false | |
| message: | |
| description:"Message to include when autosquashing revision bumps, deletions, and rebuilds (requires autosquash)" | |
| required:false | |
| env: | |
| HOMEBREW_DEVELOPER:1 | |
| HOMEBREW_NO_AUTO_UPDATE:1 | |
| HOMEBREW_NO_INSTALL_FROM_API:1 | |
| GH_REPO:${{github.repository}} | |
| GH_DEBUG:1 | |
| GH_NO_UPDATE_NOTIFIER:1 | |
| GH_PROMPT_DISABLED:1 | |
| jobs: | |
| upload: | |
| runs-on:ubuntu-22.04 | |
| container: | |
| image:ghcr.io/homebrew/ubuntu22.04:main | |
| steps: | |
| -name:Set up Homebrew | |
| id:set-up-homebrew | |
| uses:Homebrew/actions/setup-homebrew@main | |
| with: | |
| core:true | |
| cask:false | |
| -name:Configure Git user | |
| id:git-user-config | |
| uses:Homebrew/actions/git-user-config@main | |
| with: | |
| username:BrewTestBot | |
| -name:Pull bottles | |
| env: | |
| HOMEBREW_GITHUB_API_TOKEN:${{secrets.GITHUB_TOKEN}} | |
| HOMEBREW_GITHUB_PACKAGES_USER:${{ github.repository_owner }} | |
| HOMEBREW_GITHUB_PACKAGES_TOKEN:${{secrets.GITHUB_TOKEN}} | |
| run:| | |
| sudo sed -i 's/Closes ##{pr}/[skip ci]/g' "$(brew --repository)"/Library/Homebrew/dev-cmd/pr-pull.rb | |
| # Don't quote arguments that might be empty; this causes errors. | |
| brew pr-pull \ | |
| --debug \ | |
| --workflows=build.yml \ | |
| --tap=${{ github.repository_owner }}/php \ | |
| --root-url="https://ghcr.io/v2/${{ github.repository_owner }}/php" \ | |
| '${{inputs.autosquash && '--autosquash' || '--clean'}}' \ | |
| ${{inputs.warn_on_upload_failure && '--warn-on-upload-failure' || ''}} \ | |
| ${{inputs.message && format('--message="{0}"', inputs.message) || ''}} \ | |
| '${{github.event.inputs.pull_request}}' | |
| -name:Merge PR branch | |
| working-directory:${{steps.set-up-homebrew.outputs.repository-path}} | |
| run:bash .github/scripts/retry.sh 10 10 gh pr merge ${{github.event.inputs.pull_request}} --auto --delete-branch --rebase | |
| env: | |
| GITHUB_TOKEN:${{secrets.GITHUB_TOKEN}} | |
| -name:Push commits | |
| uses:Homebrew/actions/git-try-push@main | |
| with: | |
| directory:${{steps.set-up-homebrew.outputs.repository-path}} | |
| token:${{secrets.GITHUB_TOKEN}} | |
| -name:Sync branches | |
| run:gh workflow run sync-default-branches.yml | |
| env: | |
| GITHUB_TOKEN:${{secrets.GITHUB_TOKEN}} |