Skip to content

Commit 8b67b2d

Browse files
authoredDec 15, 2020
Update to use semver for images
1 parent f396918 commit 8b67b2d

File tree

2 files changed

+49
-34
lines changed

2 files changed

+49
-34
lines changed
 

‎.github/workflows/docker-ci.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: docker-ci
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
tags:
8+
- 'v*'
9+
pull_request:
10+
11+
jobs:
12+
docker:
13+
runs-on: ubuntu-latest
14+
steps:
15+
-
16+
name: Checkout
17+
uses: actions/checkout@v2
18+
-
19+
name: Docker meta
20+
id: docker_meta
21+
uses: crazy-max/ghaction-docker-meta@v1
22+
with:
23+
images: dbomproject/chainsource-gateway
24+
tag-semver: |
25+
{{version}}
26+
{{major}}.{{minor}}
27+
-
28+
name: Set up QEMU
29+
uses: docker/setup-qemu-action@v1
30+
-
31+
name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v1
33+
-
34+
name: Login to DockerHub
35+
if: github.event_name != 'pull_request'
36+
uses: docker/login-action@v1
37+
with:
38+
username: ${{ secrets.DOCKERHUB_USERNAME }}
39+
password: ${{ secrets.DOCKERHUB_TOKEN }}
40+
-
41+
name: Build and push
42+
uses: docker/build-push-action@v2
43+
with:
44+
context: .
45+
file: ./Dockerfile
46+
platforms: linux/amd64,linux/386
47+
push: ${{ github.event_name != 'pull_request' }}
48+
tags: ${{ steps.docker_meta.outputs.tags }}
49+
labels: ${{ steps.docker_meta.outputs.labels }}

‎.github/workflows/docker-image.yml

-34
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.