1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-03 01:17:41 +03:00

M #-: Run slack notifier on main repo only (#3150)

Signed-off-by: Victor Hansson <vhansson@opennebula.io>
This commit is contained in:
vichansson 2024-07-11 10:56:27 +03:00 committed by GitHub
parent 5bec6faf9f
commit a9bcd1aba8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,7 +18,7 @@ jobs:
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 }}
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 }}
@ -26,7 +26,7 @@ jobs:
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' }}
if: ${{ github.event_name == 'push' && github.repository == 'OpenNebula/one-ee' }}
uses: abinoda/slack-action@master
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}