Skip to content

Use action when Writerside project is in a sub directory? #51

Use action when Writerside project is in a sub directory?

Use action when Writerside project is in a sub directory? #51

Workflow file for this run

name: 'Send Slack notification'
on:
issue_comment:
types: [created]
issues:
types: [opened]
workflow_dispatch:
jobs:
send-slack-notification:
runs-on: ubuntu-latest
steps:
- name: GitHub issue commented
id: slack-comment
uses: slackapi/slack-github-action@v1.26.0
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
payload: |
{
"text": ":github: User _${{ github.event.comment.user.login }}_ commented on issue: <${{ github.event.issue.html_url }}|#${{ github.event.issue.number }}>"
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
if: github.event_name == 'issue_comment' && !(github.event.comment.user.login == 'Muph0' || github.event.comment.user.login == 'lananovikova10' || github.event.comment.user.login == 'siarb' || github.event.comment.user.login == 'azhebel')
- name: GitHub issue submitted
id: slack-opened
uses: slackapi/slack-github-action@v1.26.0
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
payload: |
{
"text": ":github: User _${{ github.event.issue.user.login }}_ submitted an issue: <${{ github.event.issue.html_url }}|#${{ github.event.issue.number }}>"
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
if: github.event_name == 'issues' && github.event.action == 'opened' && !(github.event.issue.user.login == 'Muph0' || github.event.issue.user.login == 'lananovikova10' || github.event.issue.user.login == 'siarb' || github.event.issue.user.login == 'azhebel')