Skip to content

Commit f9b41fa

Browse files
authored
fix: Dockerfile and CI issues (#1)
* fix: Refer to valid digest of regctl image The initial reference to the regctl docker image had a digest from the regsync image. Signed-off-by: Erik Swanson <erik@retailnext.net> * fix: Write to /tmp in validation script The default working directory is not writable by the image user. Signed-off-by: Erik Swanson <erik@retailnext.net> * fix: Don't skip "Build Images" Instead, always build the images but don't push unless it's a merge to main. Signed-off-by: Erik Swanson <erik@retailnext.net> --------- Signed-off-by: Erik Swanson <erik@retailnext.net>
1 parent 5868c9f commit f9b41fa

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

.github/workflows/ci.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ jobs:
6868
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
6969
- name: Build images
7070
uses: docker/build-push-action@v4
71-
if: ${{ github.ref == 'refs/heads/main' }}
7271
with:
7372
context: .
7473
platforms: linux/amd64,linux/arm64

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ COPY ./ ./
1010

1111
RUN CGO_ENABLED=0 go build -o /go/bin/composevalidate -trimpath -ldflags="-s -w" .
1212

13-
FROM ghcr.io/regclient/regctl:edge-alpine@sha256:8946dfb6aa44af4985701d0ad0fb740de7c500e6ae5c7a6300dbcb800a84a17c
13+
FROM ghcr.io/regclient/regctl:edge-alpine@sha256:c3c21f3c7900a02ed813a577c0619693166e21a6e8da232bfc39fbf628e91200
1414

1515
COPY --from=build /go/bin/composevalidate /usr/local/bin/
1616

ci/validate.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ set -euo pipefail
44
# Make sure regctl can be invoked
55
regctl version
66

7-
cat > compose.yaml <<EOF
7+
cat > /tmp/compose.yaml <<EOF
88
---
99
services:
1010
regctl:
1111
image: ghcr.io/regclient/regctl:edge-alpine
1212
EOF
1313

14-
composevalidate compose.yaml
14+
composevalidate /tmp/compose.yaml
1515

16-
composevalidate --platform linux/arm64 --architecture arm64 compose.yaml
16+
composevalidate --platform linux/arm64 --architecture arm64 /tmp/compose.yaml
1717

1818
echo "Image OK!"

0 commit comments

Comments
 (0)