Skip to content

Commit 009c6b0

Browse files
authored
Move Docker build workflow to using the official Docker build actions (#140)
1 parent 19e945b commit 009c6b0

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed

.github/workflows/docker.yml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,39 @@
11
name: Build & Push Docker image
2+
23
on:
34
push:
45
branches:
56
- master
67
paths:
78
- 'APPVERSION'
9+
# Allow manual runs.
10+
workflow_dispatch:
11+
812
jobs:
913
build:
1014
runs-on: ubuntu-latest
1115
steps:
1216
- name: checkout code
1317
uses: actions/checkout@v2
14-
- name: install buildx
15-
id: buildx
16-
uses: crazy-max/ghaction-docker-buildx@v1
18+
19+
- name: Setup QEMU
20+
uses: docker/[email protected]
21+
22+
- name: Setup Buildx
23+
uses: docker/[email protected]
24+
25+
- name: Login to Docker Hub
26+
uses: docker/login-action@v1
1727
with:
18-
version: latest
19-
- name: login to docker hub
20-
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USER }}" --password-stdin
21-
- name: build image
22-
run: |
23-
docker buildx build - push \
24-
--tag moncho/dry:latest \
25-
--platform linux/amd64,linux/arm/v7,linux/arm64 .
28+
username: ${{ secrets.DOCKERHUB_USERNAME }}
29+
password: ${{ secrets.DOCKERHUB_TOKEN }}
30+
31+
- name: Build and push Docker image
32+
uses: docker/[email protected]
33+
with:
34+
context: .
35+
file: ./Dockerfile
36+
tags: moncho/dry:latest
37+
platforms: linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64
38+
push: true
39+

0 commit comments

Comments
 (0)