File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed
adminforth/documentation/blog/2025-02-19-compose-ec2-deployment-ci-registry Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -803,4 +803,30 @@ sudo growpart /dev/nvme0n1 1
803803sudo resize2fs /dev/nvme0n1p1
804804` ` `
805805
806- This will extend partition to the full disk size. No reboot is needed.
806+ This will extend partition to the full disk size. No reboot is needed.
807+
808+
809+ # ## Want slack notifications about build?
810+
811+ Create Slack channel and add [Slack app](https://slack.com/apps/A0F7YS25R-incoming-webhooks) to it.
812+
813+ Then create webhook URL and add it to GitHub secrets as `SLACK_WEBHOOK_URL`.
814+
815+ Add this steps to the end of your GitHub actions file :
816+
817+ ` ` ` yml title=".github/workflows/deploy.yml"
818+ - name: Notify Slack on success
819+ if: success()
820+ run: |
821+ curl -X POST -H 'Content-type: application/json' --data \
822+ "{\" text\" : \" ✅ *${{ github.actor }}* successfully built *${{ github.ref_name }}* with commit \\\" ${{ github.event.head_commit.message }}\\\" .\n :link: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Build> | :link: <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|View Commit>\" }" \
823+ ${{ secrets.SLACK_WEBHOOK_URL }}
824+
825+ - name: Notify Slack on failure
826+ if: failure()
827+ run: |
828+ curl -X POST -H 'Content-type: application/json' --data \
829+ "{\" text\" : \" ❌ *${{ github.actor }}* failed to build *${{ github.ref_name }}* with commit \\\" ${{ github.event.head_commit.message }}\\\" .\n :link: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Build> | :link: <${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|View Commit>\" }" \
830+ ${{ secrets.SLACK_WEBHOOK_URL }}
831+
832+ ` ` `
You can’t perform that action at this time.
0 commit comments