-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (29 loc) · 1.02 KB
/
deploy-docker.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
env:
IMAGE_NODE: elrond-go-node
REGISTRY_HOSTNAME: elrondnetwork
name: Build Docker image & push
on:
release:
types: [published]
jobs:
build-docker-image:
strategy:
matrix:
runs-on: [ubuntu-latest]
runs-on: ${{ matrix.runs-on }}
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Build image
run: |
TAG_VERSION=${{ steps.get_version.outputs.VERSION }}
cd ${GITHUB_WORKSPACE} && docker build -t "${REGISTRY_HOSTNAME}/${IMAGE_NODE}:${TAG_VERSION}" -f ./docker/elrond/Dockerfile .
- name: Push image
run: |
docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password ${{ secrets.DOCKERHUB_TOKEN }}
TAG_VERSION=${{ steps.get_version.outputs.VERSION }}
docker push "${REGISTRY_HOSTNAME}/${IMAGE_NODE}:${TAG_VERSION}"
docker logout