.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:
parent
3174467751
commit
a6eef5a8cf
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
@ -13,6 +13,19 @@ on:
|
|||||||
|
|
||||||
jobs:
|
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:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@ -116,6 +129,7 @@ jobs:
|
|||||||
push:
|
push:
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
needs:
|
needs:
|
||||||
|
- vendor
|
||||||
- build
|
- build
|
||||||
- linux
|
- linux
|
||||||
- darwin
|
- darwin
|
||||||
|
Loading…
Reference in New Issue
Block a user