.github/workflows: ensure vendor is clean

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 <lserven@gmail.com>
This commit is contained in:
Lucas Servén Marín 2021-09-30 11:54:00 +02:00
parent 3174467751
commit a6eef5a8cf
1 changed files with 14 additions and 0 deletions

View File

@ -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