-
Notifications
You must be signed in to change notification settings - Fork 215
40 lines (37 loc) · 1.14 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
# Generate latest build and push it to dockerhub on push to develop branch.
# NOTE: This workflow does not include any tests, nor any dependencies, since bors guarantees
# that only code that passes all tests is ever pushed to develop.
name: Push to Dockerhub
run-name: Pushing ${{ github.ref_name }} to Dockerhub
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
on:
push:
branches:
- develop
tags:
- '*'
jobs:
dockerpush:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: Build docker images
run: |
make dockerbuild-go
make dockerbuild-bs
- name: Push docker images to dockerhub
run: |
make dockerpush-only
make dockerpush-bs-only
- name: Push docker images with version tag to dockerhub
if: startsWith(github.ref, 'refs/tags/')
run: |
export DOCKER_IMAGE_VERSION="${{ github.ref_name }}"
make dockerpush-only
make dockerpush-bs-only
export DOCKER_IMAGE_REPO="go-spacemesh"
make dockerpush-only
make dockerpush-bs-only