Skip to content

Commit b68e205

Browse files
committed
update ci docker workflow
Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
1 parent 085a69e commit b68e205

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

.github/workflows/ci-docker.yml

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: "CI: docker build"
1+
name: "CI docker"
22

3-
on: [ pull_request ]
3+
on: [pull_request, workflow_dispatch]
44

55
jobs:
66
build:
@@ -19,5 +19,26 @@ jobs:
1919
version: latest
2020
args: -E exportloopref,gofmt --timeout=30m
2121

22-
- name: Build the Docker image
23-
run: docker build . --file Dockerfile --tag ${{ github.repository }}:$(date +%s)
22+
- name: Docker meta
23+
id: docker_meta
24+
uses: docker/metadata-action@v3
25+
with:
26+
images: ${{ github.repository }},quay.io/${{ github.repository }}
27+
labels: |
28+
io.artifacthub.package.readme-url=https://raw.githubusercontent.com/${{ github.repository }}/${{ github.event.repository.default_branch }}/README.md
29+
30+
- name: Set up QEMU
31+
uses: docker/setup-qemu-action@v1
32+
33+
- name: Set up Docker Buildx
34+
uses: docker/setup-buildx-action@v1
35+
36+
- name: Build
37+
uses: docker/build-push-action@v2
38+
with:
39+
context: .
40+
file: ./Dockerfile
41+
push: false
42+
platforms: linux/amd64,linux/arm,linux/arm64
43+
tags: ${{ steps.docker_meta.outputs.tags }}
44+
labels: ${{ steps.docker_meta.outputs.labels }}

0 commit comments

Comments
 (0)