Skip to content

Commit b90735b

Browse files
Adds meta step
1 parent 2222a87 commit b90735b

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
push:
55
workflow_dispatch:
66

7-
env:
8-
DOCKER_APP_REPOSITORY: ghcr.io/${{ github.repository }}
9-
107
jobs:
118
debug:
129
runs-on: ubuntu-latest
@@ -28,9 +25,15 @@ jobs:
2825
- name: Set up Docker Buildx
2926
uses: docker/setup-buildx-action@v3
3027

28+
- name: Determine Docker image tags
29+
id: meta
30+
uses: docker/metadata-action@v5
31+
with:
32+
images: ghcr.io/${{ github.repository }}
33+
tags: type=sha,suffix=-pre-${{ github.run_id }}_${{ github.run_attempt }}
34+
3135
- name: Build and push
3236
uses: docker/build-push-action@v6
3337
with:
3438
push: false
35-
tags: |
36-
${DOCKER_APP_REPOSITORY}:run-${github.run_id}_${github.run_attempt}
39+
tags: ${{ steps.meta.outputs.tags }}

0 commit comments

Comments
 (0)