diff --git a/.github/workflows/notify-force-push.yml b/.github/workflows/notify-force-push.yml new file mode 100644 index 00000000000000..079141bba2a8d8 --- /dev/null +++ b/.github/workflows/notify-force-push.yml @@ -0,0 +1,25 @@ +on: + push: + branches: + - master + +name: Notify on Force Push +jobs: + slackNotification: + name: Slack Notification + if: ${{ github.event.forced && github.repository == 'nodejs/node' }} + runs-on: ubuntu-latest + steps: + - name: Slack Notification + uses: rtCamp/action-slack-notify@master + 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 }}