Skip to content

Commit d48b5b6

Browse files
committed
ci: Fix workflow checkouts and add manifest tests
Signed-off-by: Evan Wies <evan@neomantra.net>
1 parent d184d67 commit d48b5b6

4 files changed

Lines changed: 27 additions & 6 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,9 @@ jobs:
320320
matrix:
321321
flavor: [alpine, alpine-slim, alpine-apk, amzn2, rocky, centos, centos7, fedora, bookworm, bookworm-buildpack, bullseye, bullseye-debug, bullseye-valgrind, bionic, focal, jammy, noble]
322322
steps:
323+
- name: Checkout
324+
uses: actions/checkout@v4
325+
323326
- name: Login to GitHub Container Registry
324327
uses: docker/login-action@v3
325328
with:
@@ -454,6 +457,9 @@ jobs:
454457
matrix:
455458
flavor: [bookworm-fat, bullseye-fat, alpine-fat]
456459
steps:
460+
- name: Checkout
461+
uses: actions/checkout@v4
462+
457463
- name: Login to GitHub Container Registry
458464
uses: docker/login-action@v3
459465
with:

scripts/create-manifest.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ if [[ -z "$REGISTRY_IMAGE" ]]; then
2424
fi
2525

2626
# Define architectures for each flavor
27-
# Default to amd64 and arm64
28-
ARCHS="amd64 arm64"
27+
# Default to amd64 and arm64, can be overridden by RESTY_ARCHS env var
28+
ARCHS="${RESTY_ARCHS:-amd64 arm64}"
2929

3030
# Add s390x for Ubuntu flavors
3131
UBUNTU_FLAVORS=("bionic" "focal" "jammy" "noble")

tests/e2e/local-test.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,22 @@ jobs:
5454
- name: Tag and Push to Mirror
5555
run: |
5656
for TAG in ${{ steps.meta.outputs.tags }}; do
57-
# Replace port 5001 with 5002 for the mirror
58-
DOCKERHUB_TAG=$(echo "$TAG" | sed "s|5001|5002|")
57+
# Replace GHCR_IMAGE with DOCKERHUB_IMAGE
58+
DOCKERHUB_TAG=$(echo "$TAG" | sed "s|${{ env.GHCR_IMAGE }}|${{ env.DOCKERHUB_IMAGE }}|")
5959
docker buildx imagetools create -t "$DOCKERHUB_TAG" "$TAG"
6060
done
61+
62+
manifest:
63+
needs: build
64+
runs-on: ubuntu-latest
65+
strategy:
66+
matrix:
67+
flavor: [alpine-apk-test]
68+
steps:
69+
- name: Checkout
70+
uses: actions/checkout@v4
71+
72+
- name: Create and Push Manifest
73+
env:
74+
RESTY_ARCHS: "amd64"
75+
run: ./scripts/create-manifest.sh "${{ matrix.flavor }}" "${{ env.GHCR_IMAGE }}" "${{ env.DOCKERHUB_IMAGE }}" "true"

tests/e2e/run-test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ act workflow_dispatch \
1717
--network host
1818

1919
echo "Test complete. Verifying images..."
20-
docker pull localhost:5001/neomantra/openresty:alpine-apk-test-amd64
21-
docker pull localhost:5002/openresty/openresty:alpine-apk-test-amd64
20+
docker pull --platform linux/amd64 localhost:5001/neomantra/openresty:alpine-apk-test-amd64
21+
docker pull --platform linux/amd64 localhost:5002/openresty/openresty:alpine-apk-test-amd64
2222

2323
echo "✅ verification successful!"

0 commit comments

Comments
 (0)