From 4f75fc014385c1c1345097d88ddf4a1dbffae334 Mon Sep 17 00:00:00 2001 From: Paul B Date: Mon, 16 Oct 2023 08:53:21 -0300 Subject: [PATCH] CI: generate openapi contract before asking for contract diff --- .github/workflows/bump.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index 309fd07..62e7610 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -31,7 +31,26 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: Set up docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build docker image + uses: docker/build-push-action@v5 + with: + context: . + file: ./api/Dockerfile + tags: local:latest + load: true + cache-from: type=gha + cache-to: type=gha,mode=max + push: false + - name: Generate OpenAPI contract + uses: addnab/docker-run-action@v3 + with: + image: local:latest + options: -v ${{ github.workspace }}:/work + run: | + php bin/console api:openapi:export > /work/docs/openapi.json - name: Comment pull request with API diff uses: bump-sh/github-action@v1 with: