-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (37 loc) · 1.19 KB
/
build.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
name: Build
on: [push]
jobs:
dockerize:
name: Dockerize
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build Latest
run: docker build -t ${{ github.repository_owner }}/goose:latest .
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: [dockerize]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v1
- name: Login to github registry
uses: actions-hub/docker/login@master
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Latest
if: success()
run: |
docker build -t ${{ github.repository_owner }}/goose:latest .
docker tag ${{ github.repository_owner }}/goose:latest ${{ github.repository_owner }}/goose:${IMAGE_TAG}
- name: Push Tag
if: success()
uses: actions-hub/docker@master
with:
args: push ${{ github.repository_owner }}/goose:${IMAGE_TAG}
- name: Push Latest
if: success()
uses: actions-hub/docker@master
with:
args: push ${{ github.repository_owner }}/goose:latest