Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fey committed Jun 7, 2024
1 parent ed27e6e commit eccea3c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/Docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:

env:
REGISTRY_NAME: hexletbasics
CI: true
COLOR_MAP: '{ success: "#008000", failure: "#800000" }'

jobs:
build:
Expand All @@ -33,12 +35,11 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: latest
- name: Set fail Slack env vars
if: ${{ failure() }}
run: |
echo "SLACK_COLOR=#a30200" >> $GITHUB_ENV

- name: Send notification into Slack
if: ${{ always() }}
uses: rtCamp/action-slack-notify@v2.0.0
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: ${{ fromJson(env.COLOR_MAP)[job.status] }}
SLACK_TITLE: ${{ job.status }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

0 comments on commit eccea3c

Please sign in to comment.