Skip to content

Commit f0ec45c

Browse files
committed
fix: use lowercase image name and fix IMAGE_NAME references
1 parent ab110fd commit f0ec45c

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ on:
1818

1919
env:
2020
REGISTRY: ghcr.io
21-
IMAGE_NAME: ${{ github.repository }}
2221
# Go version must match the requirement in Tailscale's go.mod
2322
GO_VERSION: '1.25'
2423

@@ -105,6 +104,11 @@ jobs:
105104
- name: Checkout repository
106105
uses: actions/checkout@v4
107106

107+
- name: Set image name to lowercase
108+
id: image
109+
run: |
110+
echo "name=${GITHUB_REPOSITORY,,}" >> $GITHUB_OUTPUT
111+
108112
- name: Set up QEMU
109113
uses: docker/setup-qemu-action@v3
110114

@@ -123,7 +127,7 @@ jobs:
123127
id: meta
124128
uses: docker/metadata-action@v5
125129
with:
126-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
130+
images: ${{ env.REGISTRY }}/${{ steps.image.outputs.name }}
127131
tags: |
128132
type=ref,event=branch
129133
type=ref,event=pr
@@ -154,7 +158,7 @@ jobs:
154158
if: github.event_name != 'pull_request'
155159
uses: aquasecurity/trivy-action@master
156160
with:
157-
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
161+
image-ref: ${{ env.REGISTRY }}/${{ steps.image.outputs.name }}:latest
158162
format: 'sarif'
159163
output: 'trivy-results.sarif'
160164
severity: 'CRITICAL,HIGH'
@@ -163,7 +167,7 @@ jobs:
163167
- name: Build summary
164168
if: github.event_name != 'pull_request'
165169
run: |
166-
echo "## Build Complete! 🎉" >> $GITHUB_STEP_SUMMARY
170+
echo "## Build Complete!" >> $GITHUB_STEP_SUMMARY
167171
echo "" >> $GITHUB_STEP_SUMMARY
168172
echo "### Image Details" >> $GITHUB_STEP_SUMMARY
169173
echo "| Property | Value |" >> $GITHUB_STEP_SUMMARY
@@ -174,5 +178,5 @@ jobs:
174178
echo "" >> $GITHUB_STEP_SUMMARY
175179
echo "### Pull Command" >> $GITHUB_STEP_SUMMARY
176180
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
177-
echo "docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" >> $GITHUB_STEP_SUMMARY
181+
echo "docker pull ${{ env.REGISTRY }}/${{ steps.image.outputs.name }}:latest" >> $GITHUB_STEP_SUMMARY
178182
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)