Skip to content

Commit 51ea5bd

Browse files
committed
fix: change target
1 parent d2b8194 commit 51ea5bd

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

.github/workflows/ci-cd.yaml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,21 @@ jobs:
3535
username: ${{ github.actor }}
3636
password: ${{ secrets.GITHUB_TOKEN }}
3737

38-
- name: Extract version from tag or fallback
39-
id: version
40-
run: |
41-
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
42-
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
43-
else
44-
echo "TAG=0.0.1" >> $GITHUB_OUTPUT
45-
fi
38+
- name: Extract metadata
39+
id: meta
40+
uses: docker/metadata-action@v5
41+
with:
42+
images: ${{ env.IMAGE_NAME }}
4643

4744
- name: Docker Bake (build and push)
4845
uses: docker/bake-action@v6
4946
with:
5047
push: true
5148
files: |
5249
./docker-bake.hcl
50+
cwd://${{ steps.meta.outputs.bake-file-tags }}
51+
cwd://${{ steps.meta.outputs.bake-file-annotations }}
5352
targets: prod
5453
set: |
55-
*.labels.org.opencontainers.image.revision=${{ github.sha }}
5654
*.cache-from=type=gha
57-
*.cache-to=type=gha,mode=max
58-
*.args.TAG=${{ steps.version.outputs.TAG }}
55+
*.cache-to=type=gha,mode=max

0 commit comments

Comments
 (0)