fix(pull_request.yml): update conditions for success and failure steps to depend on the build job result for better accuracy in auto merge logic #19
Workflow file for this run
This file contains 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: "🔄 Pull Request" | |
on: | |
pull_request: | |
types: [ opened, synchronize, reopened, converted_to_draft, ready_for_review ] | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.event.pull_request.number }}" | |
cancel-in-progress: true | |
jobs: | |
build: | |
uses: ./.github/workflows/build.yml | |
success: | |
runs-on: ubuntu-latest | |
needs: [ build ] | |
if: ${{ always() }} | |
steps: | |
- name: "✅ Success" | |
if: ${{ needs.build.result == 'success' }} | |
run: echo "::notice title={Success}::This step triggers auto merge if all dependencies are met." | |
- name: "❌ Failure" | |
if: ${{ needs.build.result != 'success' }} | |
run: | | |
echo "::error title={Failure}::This step stops the auto merge process." | |
exit 1 | |
outputs: | |
success: "true" |