Skip to content

Commit 3158fc0

Browse files
committed
fix: update Docker tags format in CI/CD and release workflows
1 parent 829fb83 commit 3158fc0

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/ci-cd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
with:
3737
DOCKER_PATH_CONTEXT: .
3838
DOCKER_BUILD_DOCKERFILE: ./Dockerfile
39-
DOCKER_TAGS: ${{ vars.DOCKER_USERNAME }}_${{ vars.DOCKER_REPOSITORY }}_${{ github.sha }}
39+
DOCKER_TAGS: ${{ vars.DOCKER_USERNAME }}/${{ vars.DOCKER_REPOSITORY }}:${{ github.sha }}
4040
DOCKER_LOAD_BOOL: false
4141
DOCKER_PUSH_BOOL: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
4242
DOCKER_USERNAME: ${{ vars.DOCKER_USERNAME }}

.github/workflows/docker-build-and-scan.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
file: ${{ env.DOCKER_BUILD_DOCKERFILE }}
5555
platforms: ${{ matrix.platform }}
5656
push: true
57-
tags: docker.io/${{ env.DOCKER_TAGS }}-${{ matrix.platform }}
57+
tags: docker.io/${{ env.DOCKER_TAGS }}-${{ matrix.platform.replace('/', '-') }}
5858
- name: Run Trivy vulnerability scanner (per-arch)
5959
uses: aquasecurity/trivy-action@0.35.0
6060
with:

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
DOCKER_PATH_CONTEXT: ${{ inputs.DOCKER_PATH_CONTEXT }}
9595
DOCKER_BUILD_DOCKERFILE: ${{ inputs.DOCKER_BUILD_DOCKERFILE }}
9696
DOCKER_LOAD_BOOL: false
97-
DOCKER_TAGS: ${{ inputs.DOCKER_USERNAME }}_${{ inputs.DOCKER_REPOSITORY }}_${{ needs.Semantic-Release.outputs.tag }}
97+
DOCKER_TAGS: ${{ inputs.DOCKER_USERNAME }}/${{ inputs.DOCKER_REPOSITORY }}:${{ needs.Semantic-Release.outputs.tag }}
9898
DOCKER_PUSH_BOOL: true
9999
DOCKER_USERNAME: ${{ inputs.DOCKER_USERNAME }}
100100
DOCKER_PLATFORMS: '["linux/amd64","linux/arm64"]'

0 commit comments

Comments
 (0)