@@ -28,10 +28,40 @@ jobs:
2828 LATEST_VERSION=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' https://github.com/wiremock/wiremock.git '4.*.*' | tail -1 | cut -d '/' -f3)
2929 echo "NEW_VERSION=${{ github.event.inputs.bundled-version }}-${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
3030
31- docker-build-push :
31+ verify-container-startup :
3232 runs-on : ubuntu-latest
3333 needs : [check-new-version]
3434 if : needs.check-new-version.outputs.new_version
35+ steps :
36+
37+ - name : Set up Docker Buildx
38+ uses : docker/setup-buildx-action@v2
39+
40+ - name : Checkout sources
41+ uses : actions/checkout@main
42+
43+ - name : Build WireMock Docker image (local)
44+ run : |
45+ docker buildx build \
46+ --tag wiremock/wiremock:verify \
47+ --load \
48+ --build-arg "WIREMOCK_VERSION=${{ github.event.inputs.bundled-version }}" \
49+ --build-arg "JAVA_VERSION=17" \
50+ --file Dockerfile \
51+ .
52+
53+ - name : Verify container startup
54+ run : |
55+ docker run -d --name wiremock-test -p 8080:8080 wiremock/wiremock:verify
56+ timeout 30 bash -c 'until curl -sf http://localhost:8080/__admin/health; do sleep 1; done'
57+ echo "WireMock container started and health check passed"
58+ docker stop wiremock-test
59+ docker rm wiremock-test
60+
61+ docker-build-push :
62+ runs-on : ubuntu-latest
63+ needs : [check-new-version, verify-container-startup]
64+ if : needs.check-new-version.outputs.new_version
3565 strategy :
3666 matrix :
3767 versions :
96126 push : true
97127 tags : ${{ join(matrix.versions.IMAGES, ',') }}
98128 build-args : |
99- "WIREMOCK_VERSION=${{ github.event.inputs.bundled-version }}"
129+ WIREMOCK_VERSION=${{ github.event.inputs.bundled-version }}
130+ JAVA_VERSION=17
100131
101132 container-image-scan :
102133 uses : ./.github/workflows/container-image-scan.yml
0 commit comments