Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto selection of slack channel if not provided #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/slack-notif.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
required: true
type: string
channel-id:
required: true
type: string
tag:
required: true
Expand All @@ -32,7 +31,7 @@ jobs:
id: slack
uses: slackapi/[email protected]
with:
channel-id: ${{ inputs.channel-id }}
channel-id: ${{ inputs.channel-id || (contains(inputs.environment, 'production') && 'C05P09PFTQU') || 'C56QR2WG6' }}
SynRJ marked this conversation as resolved.
Show resolved Hide resolved
payload: |
{
"text": "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}",
Expand Down Expand Up @@ -72,4 +71,4 @@ jobs:
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.botToken }}
SLACK_BOT_TOKEN: ${{ secrets.botToken }}