diff --git a/.github/workflows/notify-on-push.yml b/.github/workflows/notify-on-push.yml new file mode 100644 index 0000000000000..9bf910f6ab278 --- /dev/null +++ b/.github/workflows/notify-on-push.yml @@ -0,0 +1,28 @@ +on: + push: + branches: + - main + +name: Notify on Push +permissions: + contents: read + +jobs: + notify_on_push: + name: Notify on Force Push on `main` + if: github.repository == 'nodejs/nodejs.org' && github.event.forced + 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 }} force-pushed to ${{ github.ref }} + SLACK_MESSAGE: | + A commit was force-pushed to by + + Before: + After: + SLACK_USERNAME: nodejs-bot + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}