Skip to content

Commit 104c262

Browse files
committed
ci: user lowercase org to be able to push to registry
1 parent 44d31ff commit 104c262

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ jobs:
1414
id: version
1515
run: echo "value=commit-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
1616

17+
- name: Github org lowercase
18+
id: org
19+
run: "value=${GITHUB_REPOSITORY@L}" >> $GITHUB_OUTPUT
20+
1721
- name: Login to GitHub Container Registry
1822
uses: docker/login-action@v3
1923
with:
@@ -33,12 +37,12 @@ jobs:
3337
platforms: linux/amd64,linux/arm64
3438
push: true
3539
tags: |
36-
ghcr.io/${{ github.repository }}:${{ steps.version.outputs.value }}
40+
ghcr.io/${{ steps.org.outputs.value }}:${{ steps.version.outputs.value }}
3741
3842
- name: Run Trivy vulnerability scanner
3943
uses: aquasecurity/trivy-action@master
4044
with:
41-
image-ref: "ghcr.io/${{ github.repository }}:${{ steps.version.outputs.value }}"
45+
image-ref: "ghcr.io/${{ steps.org.outputs.value }}:${{ steps.version.outputs.value }}"
4246
format: "sarif"
4347
output: "trivy-results.sarif"
4448

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ jobs:
1010
docker:
1111
runs-on: ubuntu-latest
1212
steps:
13+
- name: Github org lowercase
14+
id: org
15+
run: "value=${GITHUB_REPOSITORY@L}" >> $GITHUB_OUTPUT
16+
1317
- name: Login to GitHub Container Registry
1418
uses: docker/login-action@v3
1519
with:
@@ -29,5 +33,5 @@ jobs:
2933
platforms: linux/amd64,linux/arm64
3034
push: true
3135
tags: |
32-
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
36+
ghcr.io/${{ steps.org.outputs.value }}:${{ github.ref_name }}
3337

0 commit comments

Comments
 (0)