Просмотр исходного кода

.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>
Lucas Servén Marín 4 лет назад
Родитель
Сommit
a6eef5a8cf
1 измененных файлов с 14 добавлено и 0 удалено
  1. 14 0
      .github/workflows/ci.yml

+ 14 - 0
.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