From 60d466bf267beee6b14e1d04113da6eaccf690dd Mon Sep 17 00:00:00 2001 From: tdakkota Date: Tue, 3 Dec 2024 04:06:14 +0300 Subject: [PATCH] ci(workflows): ensure docker image is working properly --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 414a64e1a..059f25e3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,3 +107,28 @@ jobs: - name: Run tests run: cd examples && go test ./... + + ensure-docker: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build image + run: | + docker buildx build . \ + --platform linux/amd64 \ + --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_REF_NAME + + - name: Check image + run: | + docker run \ + -v ./_testdata/examples/petstore.yml:/petstore.yml \ + --rm \ + ghcr.io/$GITHUB_REPOSITORY:$GITHUB_REF_NAME /petstore.yml