From 5a57e1f164e690e7e4cd3d2498f4ed4f91995547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Serv=C3=A9n=20Mar=C3=ADn?= Date: Thu, 30 Sep 2021 11:54:00 +0200 Subject: [PATCH] .github/workflows: ensure vendor is clean MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds a stage to the GitHub Actions CI workflow to verify that vendor and go.mod/sum are always up-to-date. If the vendored files require any changes then CI will fail. This ensures that the repo remains the source of truth. Signed-off-by: Lucas Servén Marín --- .github/workflows/ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c261b97..0950026 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,19 @@ on: jobs: + vendor: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.16.5 + - name: Vendor + run: | + make vendor + git diff --exit-code + build: runs-on: ubuntu-latest steps: @@ -116,6 +129,7 @@ jobs: push: if: github.event_name != 'pull_request' needs: + - vendor - build - linux - darwin