Skip to content

Commit d9623a9

Browse files
committed
Also build image on push to master
1 parent 011f1f1 commit d9623a9

File tree

2 files changed

+44
-5
lines changed

2 files changed

+44
-5
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build edge Docker images
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
publish_to_docker_hub:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v2
14+
15+
- name: Prepare tags
16+
id: prep
17+
run: |
18+
DOCKER_IMAGE=milesmcc/shynet
19+
TAGS="${DOCKER_IMAGE}:edge"
20+
echo ::set-output name=tags::${TAGS}
21+
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v1
24+
25+
- name: Set up Docker Buildx
26+
id: buildx
27+
uses: docker/setup-buildx-action@v1
28+
29+
- name: Login to DockerHub
30+
uses: docker/login-action@v1
31+
with:
32+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
33+
password: ${{ secrets.DOCKER_HUB_TOKEN }}
34+
35+
- name: Build and push advanced image
36+
id: docker_build
37+
uses: docker/build-push-action@v2
38+
with:
39+
context: .
40+
file: ./Dockerfile
41+
platforms: linux/amd64,linux/arm64,linux/arm/v7
42+
push: true
43+
tags: ${{ steps.prep.outputs.tags }}

.github/workflows/build-docker.yml renamed to .github/workflows/build-docker-release.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
name: Build docker images
1+
name: Build release Docker images
22

33
on:
44
push:
55
tags:
66
- "*"
7-
branches:
8-
- master
97

108
jobs:
119
publish_to_docker_hub:
12-
1310
runs-on: ubuntu-latest
14-
1511
steps:
1612
- name: Checkout code
1713
uses: actions/checkout@v2

0 commit comments

Comments
 (0)