Skip to content

Commit 4bdd68c

Browse files
committed
add dockerhub workflow
1 parent 57f821e commit 4bdd68c

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/dockerhub.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Push docker images to Dockerhub
2+
3+
on:
4+
push:
5+
branches: master
6+
tags:
7+
- "v*.*.*"
8+
9+
jobs:
10+
multi:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Set up QEMU
16+
uses: docker/setup-qemu-action@v1
17+
- name: Set output
18+
id: vars
19+
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v1
22+
- name: Login to DockerHub
23+
uses: docker/login-action@v1
24+
with:
25+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
26+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
27+
28+
- name: Build and push latest Pattern Atlas UI
29+
if: ${{ steps.vars.outputs.tag == 'master' }}
30+
uses: docker/build-push-action@v2
31+
with:
32+
context: .
33+
push: true
34+
tags: patternatlas/pattern-atlas-db:latest
35+
36+
- name: Build and push version of Pattern Atlas UI
37+
if: ${{ steps.vars.outputs.tag != 'master' }}
38+
uses: docker/build-push-action@v2
39+
with:
40+
context: .
41+
push: true
42+
tags: patternatlas/pattern-atlas-db:${{ steps.vars.outputs.tag }}

0 commit comments

Comments
 (0)