File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 4
4
workflow_dispatch :
5
5
inputs :
6
6
name :
7
- description : Docker image tag to apply to the image (e.g., debug-version)
7
+ description : Docker image tag to apply to the image
8
8
required : true
9
9
10
10
env :
11
11
REGISTRY : ghcr.io
12
- IMAGE_NAME : ${{ github.repository | toLower() }}
12
+ IMAGE_NAME : ${{ github.repository }}
13
13
14
14
jobs :
15
15
build :
@@ -35,12 +35,20 @@ jobs:
35
35
username : ${{ github.actor }}
36
36
password : ${{ secrets.GITHUB_TOKEN }}
37
37
38
- - name : Build and push Docker image with custom tag
38
+ - name : Extract metadata (tags, labels) for Docker
39
+ id : meta
40
+ uses : docker/metadata-action@v5
41
+ with :
42
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
43
+ tags : ${{ github.event.inputs.name }}
44
+
45
+ - name : Build and push Docker image
39
46
uses : docker/build-push-action@v6
40
47
env :
41
48
DOCKER_BUILD_SUMMARY : false
42
49
with :
43
50
context : .
44
51
push : true
45
52
platforms : linux/amd64,linux/arm64
46
- tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.name | toLower() }}
53
+ tags : ${{ steps.meta.outputs.tags }}
54
+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments