Skip to content

B #6472: Fix remove_off_hosts() #118

B #6472: Fix remove_off_hosts()

B #6472: Fix remove_off_hosts() #118

name: Slack Push Notifier
on:
push:
branches: [master]
pull_request:
types: [closed]
branches: [master]
workflow_dispatch:
jobs:
notify_slack_push:
name: Notify Slack on pushes
runs-on: ubuntu-latest
steps:
- name: String manipulation
run: echo "COMMIT_ONELINER=${{ github.event.head_commit.message }}${{ github.event.pull_request.title }}"|grep -v '^$'|head -1 >> $GITHUB_ENV
- name: It is a merged pull request
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true }}
uses: abinoda/slack-action@master
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
args: '{\"channel\":\"${{ secrets.SLACK_CHANNEL_ID }}\",\"blocks\":[{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\" > --> *New PR merged:* <${{ github.event.pull_request.html_url }}|${{ env.COMMIT_ONELINER }}> (<${{ github.event.pull_request.html_url }}|PR>)\n\"}}]}'
- name: It is a direct push
if: ${{ github.event_name == 'push' }}
uses: abinoda/slack-action@master
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
args: '{\"channel\":\"${{ secrets.SLACK_CHANNEL_ID }}\",\"blocks\":[{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\" > --> *New Commit:* <${{ github.event.head_commit.url }}|${{ env.COMMIT_ONELINER }}>\n\"}}]}'