diff --git a/.github/workflows/workflow_test.yml b/.github/workflows/workflow_test.yml index fe9956275..5e87f9cee 100644 --- a/.github/workflows/workflow_test.yml +++ b/.github/workflows/workflow_test.yml @@ -139,3 +139,25 @@ jobs: workflows: true workflow-namespace: iwc-workflows github-token: ${{ secrets.IWC_WORKFLOWS_BOT_TOKEN }} + + deploy-report: + name: Report deploy status + needs: [deploy] + if: ${{ always() && needs.deploy.result != 'success' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' ) && github.repository_owner == 'galaxyproject' }} + runs-on: ubuntu-latest + steps: + # report to the PR if deployment failed + - name: Get PR object + uses: 8BitJonny/gh-get-current-pr@2.2.0 + id: getpr + with: + sha: ${{ github.event.after }} + - name: Create comment + uses: peter-evans/create-or-update-comment@v2 + with: + token: ${{ secrets.PAT }} + issue-number: ${{ steps.getpr.outputs.number }} + body: | + Attention: deployment ${{ needs.deploy.result }}! + + https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}