-
Notifications
You must be signed in to change notification settings - Fork 7
42 lines (36 loc) · 992 Bytes
/
docker_image.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
name: DockerImage
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
- name: Test
run: |
docker build --target builder -t base .
docker run --rm base go test -v
- name: Build final image
run: docker build -t cromega/keyguard .
- name: Docker push
env:
DOCKERHUB_PW: ${{ secrets.dockerhub_password }}
run: |
echo "$DOCKERHUB_PW" | docker login -u cromega --password-stdin
docker push cromega/keyguard
trigger-deploy:
needs: [release]
runs-on: ubuntu-latest
steps:
- name: Trigger deployment
env:
TOKEN: ${{ secrets.repo_token }}
run: |
curl -f -X POST \
-H "Authorization: token $TOKEN" \
https://api.github.com/repos/cromega/sublimia-platform/dispatches \
--data '{"event_type":"deploy:keyguard"}'