From 5b5fb88933cf3c7b9b20f116abd0ce9454a2d5e1 Mon Sep 17 00:00:00 2001 From: Richard Hagen Date: Mon, 11 Dec 2023 13:06:13 +0100 Subject: [PATCH] always check breaking changes --- .github/workflows/pr.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 8a4bfe57..744dab41 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -46,7 +46,9 @@ jobs: name: Test Swagger runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + with: + fetch-depth: 2 - uses: actions/setup-go@v4 with: go-version: '1.21' @@ -61,9 +63,10 @@ jobs: - name: Check breaking changes if: always() id: breaking - run: swagger diff --break <(git show HEAD~1:swaggerui/html/swagger.json --quiet) ./swaggerui/html/swagger.json > swagger_breaking_changes.txt + run: swagger diff --break <(git show HEAD~1:swaggerui/html/swagger.json --quiet) ./swaggerui/html/swagger.json > swagger_breaking_changes.txt - name: Add comment if: always() + needs: [breaking] uses: mshick/add-pr-comment@v2 with: message-id: breaking-comment