diff --git a/.github/workflows/notify-on-force-push.yml b/.github/workflows/notify-on-force-push.yml new file mode 100644 index 0000000..46a7b47 --- /dev/null +++ b/.github/workflows/notify-on-force-push.yml @@ -0,0 +1,30 @@ +name: Notify on Push +on: + push: + branches: + - main + +permissions: + contents: read + +jobs: + notify-on-push: + name: Notify on any direct push to `main` + if: > + github.repository == 'nodejs/release-cloudflare-worker' && + github.actor != 'github-merge-queue[bot]' + runs-on: ubuntu-latest + steps: + - name: Slack Notification + uses: rtCamp/action-slack-notify@c33737706dea87cd7784c687dadc9adf1be59990 # 2.3.2 + env: + SLACK_COLOR: '#DE512A' + SLACK_ICON: https://github.com/nodejs.png?size=48 + SLACK_TITLE: ${{ github.actor }} directly pushed to ${{ github.ref }} + SLACK_MESSAGE: | + A commit was directly pushed to by + + Before: + After: + SLACK_USERNAME: nodejs-bot + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}