-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.59 KB
/
dockerhub.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
name: Release docker image to docker hub
on:
release:
types: [created]
# Environment variables available to all jobs and steps in this workflow
env:
GITHUB_SHA: ${{ github.sha }}
GKE_ZONE: europe-west4-c
GKE_CLUSTER: igrant-cluster
REGISTRY_HOSTNAME: eu.gcr.io
jobs:
setup-build-publish-deploy:
name: Setup, Build, Publish, and Deploy
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
token: ${{ secrets.TOKEN }}
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Extract tag from version
id: extract_tag
run: echo ::set-output name=TAG::$(echo ${{ steps.get_version.outputs.VERSION }} | sed 's/refs\/tags\///')
- name: Set Docker Tag
run: echo "DOCKER_HUB_TAG=${{steps.extract_tag.outputs.TAG}}" >> $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Build the Go builder docker image
- name: Build the Go builder docker image
shell: 'script -q -e -c "bash {0}"'
run: |
make build/docker/builder
# Build docker image, publish docker image to docker hub
- name: Build docker image, publish docker image to docker image to docker hub
shell: 'script -q -e -c "bash {0}"'
run: |
make build/docker/deployable/dockerhub publish/dockerhub