B OpenNebula/one#6759: Add extra checks for ports in SecurityGroup va… #182
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 && github.repository == 'OpenNebula/one-ee' }} | |
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' && github.repository == 'OpenNebula/one-ee' }} | |
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\"}}]}' |