Skip to content

Commit

Permalink
Allow to skip slack message (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwi authored Apr 26, 2024
1 parent 77ba5b1 commit bf2a49b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/cd-swarm-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ on:
type: string
default: ubuntu-latest
description: The default runner.
NOTIFY_SLACK:
required: false
type: boolean
default: true
SLACK_CHANNEL:
required: true
required: false
type: string
description: Default slack channel to post a message
ENDPOINT_ID:
Expand Down Expand Up @@ -110,7 +114,7 @@ jobs:
PORTAINER_DOMAIN: ${{ inputs.PORTAINER_DOMAIN }}

- uses: ./actions/.github/actions/slack
if: always()
if: ${{ inputs.NOTIFY_SLACK == true }}
name: slack notification
with:
MESSAGE: 'Update Service - ${{ inputs.STACK_NAME }}!\n>GitHub Action result - ${{ github.event.pull_request.html_url || github.event.head_commit.url }}\n>*Previous Image:* ${{ steps.swarm-deploy.outputs.PREVIOUS_IMAGE }}\n>*New Image:* ${{ inputs.IMAGE_TAG }}'
Expand Down

0 comments on commit bf2a49b

Please sign in to comment.