File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 1
- name : DockerHub
1
+ name : Build and publish Docker image
2
2
3
3
on :
4
4
workflow_dispatch :
13
13
- " v*.*.*"
14
14
paths :
15
15
- " .dockerignore"
16
- - " .github/workflows/dockerhub .yml"
16
+ - " .github/workflows/build-publish .yml"
17
17
- " app/*"
18
18
- " Dockerfile"
19
19
- " install_acme.sh"
20
20
21
21
jobs :
22
22
multiarch-build :
23
+ name : Build and publish Docker image
23
24
runs-on : ubuntu-latest
24
25
steps :
25
26
- name : Checkout
28
29
fetch-depth : 0
29
30
30
31
- name : Retrieve version
31
- run : echo "GIT_DESCRIBE=$(git describe --tags)" >> $GITHUB_ENV
32
+ id : acme-companion_version
33
+ run : echo "VERSION=$(git describe --tags)" >> "$GITHUB_OUTPUT"
32
34
33
35
- name : Get Docker tags
34
36
id : docker_meta
44
46
type=raw,value=latest,enable={{is_default_branch}}
45
47
labels : |
46
48
org.opencontainers.image.authors=Nicolas Duchon <nicolas.duchon@gmail.com> (@buchdag), Yves Blusseau
47
- org.opencontainers.image.version=${{ env.GIT_DESCRIBE }}
49
+ org.opencontainers.image.version=${{ steps.acme-companion_version.outputs.VERSION }}
48
50
49
51
- name : Set up QEMU
50
52
uses : docker/setup-qemu-action@v2
@@ -70,11 +72,13 @@ jobs:
70
72
uses : docker/build-push-action@v4
71
73
with :
72
74
context : .
73
- build-args : GIT_DESCRIBE=${{ env.GIT_DESCRIBE }}
75
+ build-args : GIT_DESCRIBE=${{ steps.acme-companion_version.outputs.VERSION }}
74
76
platforms : linux/amd64,linux/arm64,linux/arm/v7
75
77
push : true
76
78
tags : ${{ steps.docker_meta.outputs.tags }}
77
79
labels : ${{ steps.docker_meta.outputs.labels }}
80
+ cache-from : type=gha
81
+ cache-to : type=gha,mode=max
78
82
79
83
- name : Image digest
80
84
run : echo ${{ steps.docker_build.outputs.digest }}
You can’t perform that action at this time.
0 commit comments