|
|
|
@ -90,19 +90,20 @@ jobs: |
|
|
|
|
fi |
|
|
|
|
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV |
|
|
|
|
echo "PR_TITLE=$PR_TITLE" >> $GITHUB_ENV |
|
|
|
|
|
|
|
|
|
- name: Notify on Slack (Success) |
|
|
|
|
if: success() && github.event_name == 'push' && steps.check_pypi.outputs.increment == 'True' |
|
|
|
|
uses: slackapi/slack-github-action@v2.0.0 |
|
|
|
|
with: |
|
|
|
|
webhook-type: incoming-webhook |
|
|
|
|
webhook: ${{ secrets.SLACK_WEBHOOK_URL_YOLO }} |
|
|
|
|
payload: | |
|
|
|
|
{"text": "<!channel> GitHub Actions success for ${{ github.workflow }} ✅\n\n\n*Repository:* https://github.com/${{ github.repository }}\n*Action:* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Author:* ${{ github.actor }}\n*Event:* NEW `${{ github.repository }} ${{ steps.check_pypi.outputs.current_tag }}` pip package published 😃\n*Job Status:* ${{ job.status }}\n*Pull Request:* <https://github.com/${{ github.repository }}/pull/${{ env.PR_NUMBER }}> ${{ env.PR_TITLE }}\n"} |
|
|
|
|
env: |
|
|
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_YOLO }} |
|
|
|
|
text: "<!channel> GitHub Actions success for ${{ github.workflow }} ✅\n\n\n*Repository:* https://github.com/${{ github.repository }}\n*Action:* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Author:* ${{ github.actor }}\n*Event:* NEW `${{ github.repository }} ${{ steps.check_pypi.outputs.current_tag }}` pip package published 😃\n*Job Status:* ${{ job.status }}\n*Pull Request:* <https://github.com/${{ github.repository }}/pull/${{ env.PR_NUMBER }}> ${{ env.PR_TITLE }}\n" |
|
|
|
|
- name: Notify on Slack (Failure) |
|
|
|
|
if: failure() |
|
|
|
|
uses: slackapi/slack-github-action@v2.0.0 |
|
|
|
|
with: |
|
|
|
|
webhook-type: incoming-webhook |
|
|
|
|
webhook: ${{ secrets.SLACK_WEBHOOK_URL_YOLO }} |
|
|
|
|
payload: | |
|
|
|
|
{"text": "<!channel> GitHub Actions error for ${{ github.workflow }} ❌\n\n\n*Repository:* https://github.com/${{ github.repository }}\n*Action:* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Author:* ${{ github.actor }}\n*Event:* ${{ github.event_name }}\n*Job Status:* ${{ job.status }}\n*Pull Request:* <https://github.com/${{ github.repository }}/pull/${{ env.PR_NUMBER }}> ${{ env.PR_TITLE }}\n"} |
|
|
|
|
env: |
|
|
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_YOLO }} |
|
|
|
|
text: "<!channel> GitHub Actions error for ${{ github.workflow }} ❌\n\n\n*Repository:* https://github.com/${{ github.repository }}\n*Action:* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Author:* ${{ github.actor }}\n*Event:* ${{ github.event_name }}\n*Job Status:* ${{ job.status }}\n*Pull Request:* <https://github.com/${{ github.repository }}/pull/${{ env.PR_NUMBER }}> ${{ env.PR_TITLE }}\n" |
|
|
|
|