Skip to content

Commit 9b41aaf

Browse files
author
Andre Anundsson (Xenit)
committed
hotfix pipeline build step
1 parent a2cb2c2 commit 9b41aaf

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/container-build-template.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ jobs:
2525
- name: Set up Docker Buildx
2626
uses: docker/setup-buildx-action@v3
2727

28+
- name: Convert Repository Name to Lowercase
29+
id: repository_to_lower_case
30+
run: |
31+
echo "repo_lower=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
32+
2833
- name: Login to GitHub Container Registry
2934
if: ${{ inputs.push }}
3035
uses: docker/login-action@v3
@@ -37,17 +42,17 @@ jobs:
3742
id: build-push
3843
uses: docker/build-push-action@v6
3944
with:
40-
cache-from: "ghcr.io/${{ github.repository }}/tools:latest"
45+
cache-from: "ghcr.io/${{ steps.repository_to_lower_case.outputs.repo_lower }}/tools:latest"
4146
file: docker/Dockerfile
4247
context: docker
43-
tags: "ghcr.io/${{ github.repository_owner }}/${{ github.repository }}/tools:${{ inputs.tag }}"
48+
tags: "ghcr.io/${{ steps.repository_to_lower_case.outputs.repo_lower }}/tools:${{ inputs.tag }}"
4449
platforms: ${{ inputs.platforms }}
4550
push: ${{ inputs.push }}
4651

4752
- name: Generate Artifact Attestation
4853
if: ${{ inputs.push }}
4954
uses: actions/attest-build-provenance@v2
5055
with:
51-
subject-name: ghcr.io/${{ github.repository }}
56+
subject-name: ghcr.io/${{ steps.repository_to_lower_case.outputs.repo_lower }}
5257
subject-digest: ${{ steps.build-push.outputs.digest }}
5358
push-to-registry: true

0 commit comments

Comments
 (0)