diff --git a/.github/workflows/merge-acm-flow.yaml b/.github/workflows/merge-acm-flow.yaml index a0290c4..c667539 100644 --- a/.github/workflows/merge-acm-flow.yaml +++ b/.github/workflows/merge-acm-flow.yaml @@ -269,10 +269,15 @@ jobs: continue-on-error: true id: slack-message run: | - if [ ${{ steps.pr-exists.outputs.pr_exists }} != '1' ] || [ ${{ steps.fork-sync.outputs.status }} == "uptodate" ] || [ ${{ steps.fork-sync.outputs.status }} == "ahead" ] ; then + if [ "${{ steps.pr-exists.outputs.pr_exists }}" == "1" ]; then + PR_URL="${{ steps.pr-exists.outputs.pr_url }}" + else + PR_URL="${{ steps.create-pr.outputs.pull-request-url }}" + fi + if [ "${{ steps.fork-sync.outputs.status }}" == "uptodate" ] || [ "${{ steps.fork-sync.outputs.status }}" == "ahead" ]; then echo "message=${{ inputs.downstream }} is already ${{ steps.fork-sync.outputs.status }} with tag ${{ steps.org.outputs.downstream-version }}." >> $GITHUB_OUTPUT else - echo "message=PR ${{ steps.create-pr.outputs.pull-request-url }} || ${{ steps.pr-exists.outputs.pr_url }} has been ${{ steps.create-pr.outputs.pull-request-operation || 'updated' }}." >> $GITHUB_OUTPUT + echo "message=PR $PR_URL has been ${{ steps.create-pr.outputs.pull-request-operation || 'updated' }}." >> $GITHUB_OUTPUT fi - uses: 8398a7/action-slack@v3 if: github.event_name != 'pull_request' && (success() || steps.fork-sync.outputs.status == 'uptodate' || steps.fork-sync.outputs.status == 'ahead' || steps.pr-exists.outputs.pr_exists == '1')