-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (44 loc) · 1.42 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Tabroom Indexcards API Publish
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CI: true
HUSKY: 0
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set Docker Tag by commit
id: get_version
run: echo COMMIT_VERSION=$(echo $GITHUB_SHA) >> $GITHUB_ENV
- name: Publish Indexcards image to Registry
uses: elgohr/Publish-Docker-Github-Action@v4
with:
name: nsda/indexcards
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
registry: registry.speechanddebate.org
tags: "${{ env.COMMIT_VERSION }}"
- name: Publish cron image to Registry
uses: elgohr/Publish-Docker-Github-Action@v4
with:
name: nsda/indexcards/cron
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
registry: registry.speechanddebate.org
tags: "${{ env.COMMIT_VERSION }}"
dockerfile: cron.Dockerfile
- name: If image was published change icon
if: success()
run: echo "SLACK_ICON=:white_check_mark:" >> $GITHUB_ENV
- name: Send slack notification
uses: speechanddebate/action-slack-notify@master