TEST4 #11
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: Notify | |
on: | |
pull_request: | |
types: [opened] | |
issues: | |
types: [opened] | |
jobs: | |
new_push_job: | |
runs-on: ubuntu-latest | |
name: New push to repo | |
steps: | |
- name: Notify slack on pull request | |
if: ${{ github.event_name == 'pull_request' }} | |
id: slack-pr | |
uses: slackapi/slack-github-action@v1.24.0 | |
with: | |
payload: "{\"text\":\"New pull request on repository ${{ github.repository }}: ${{ github.server_url }}/${{ github.repository }}/pull/${{ github.event.issue.number }}\"}" | |
env: | |
SLACK_WEBHOOK_URL: ${{ vars.SLACK_INCOMING_WEBHOOK_URL }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | |
- name: Notify slack on issue | |
if: ${{ github.event_name == 'issues' }} | |
id: slack-issue | |
uses: slackapi/slack-github-action@v1.24.0 | |
with: | |
payload: "{\"text\":\"New issue on repository ${{ github.repository }}: ${{ github.server_url }}/${{ github.repository }}/issues/${{ github.event.issue.number }}\"}" | |
env: | |
SLACK_WEBHOOK_URL: ${{ vars.SLACK_INCOMING_WEBHOOK_URL }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |