Skip to content

Commit ee946b9

Browse files
committed
Update workflow jobs
1 parent 7538527 commit ee946b9

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

.github/workflows/docker.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,26 @@ on:
44
push:
55
branches: [ master, release/* ]
66

7-
env:
8-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
9-
107
jobs:
118
build:
129
runs-on: ubuntu-latest
1310
env:
1411
REPOSITORY_URL: docker.pkg.github.com
1512
IMAGE_NAME: ${{ github.repository }}/alerta-cli
13+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
1614
steps:
15+
- uses: alerta/actions/slacky@master
16+
with:
17+
status: starting
18+
channel: '#workflows'
19+
if: always()
1720
- name: Checkout
1821
uses: actions/checkout@v2
1922
- name: Variables
2023
id: vars
2124
run: echo "::set-output name=SHORT_COMMIT_ID::$(git rev-parse --short HEAD)"
2225
- name: Build image
26+
id: docker-build
2327
run: >-
2428
docker build
2529
-t $IMAGE_NAME
@@ -31,10 +35,12 @@ jobs:
3135
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
3236
run: docker login $REPOSITORY_URL --username "$DOCKER_USERNAME" --password "$DOCKER_PASSWORD"
3337
- name: Publish Image
38+
id: docker-push
3439
run: docker push $REPOSITORY_URL/$IMAGE_NAME
3540

36-
- name: Notify Slack
37-
uses: alerta/actions/slacky@master
41+
- uses: alerta/actions/slacky@master
3842
with:
3943
status: ${{ job.status }}
44+
steps: ${{ toJson(steps) }}
45+
channel: '#workflows'
4046
if: always()

0 commit comments

Comments
 (0)