|
@@ -24,8 +24,13 @@ env:
|
|
|
DOCKER_GRAPHDRIVER: overlay2
|
|
|
|
|
|
jobs:
|
|
|
+ validate-dco:
|
|
|
+ uses: ./.github/workflows/.dco.yml
|
|
|
+
|
|
|
build-dev:
|
|
|
runs-on: ubuntu-20.04
|
|
|
+ needs:
|
|
|
+ - validate-dco
|
|
|
strategy:
|
|
|
fail-fast: false
|
|
|
matrix:
|
|
@@ -55,6 +60,60 @@ jobs:
|
|
|
*.cache-to=type=gha,scope=dev${{ matrix.mode }},mode=max
|
|
|
*.output=type=cacheonly
|
|
|
|
|
|
+ validate-prepare:
|
|
|
+ runs-on: ubuntu-20.04
|
|
|
+ needs:
|
|
|
+ - validate-dco
|
|
|
+ outputs:
|
|
|
+ matrix: ${{ steps.scripts.outputs.matrix }}
|
|
|
+ steps:
|
|
|
+ -
|
|
|
+ name: Checkout
|
|
|
+ uses: actions/checkout@v3
|
|
|
+ -
|
|
|
+ name: Create matrix
|
|
|
+ id: scripts
|
|
|
+ run: |
|
|
|
+ scripts=$(jq -ncR '[inputs]' <<< "$(ls -I .validate -I all -I default -I dco -I golangci-lint.yml -I yamllint.yaml -A ./hack/validate/)")
|
|
|
+ echo "::set-output name=matrix::$scripts"
|
|
|
+ -
|
|
|
+ name: Show matrix
|
|
|
+ run: |
|
|
|
+ echo ${{ steps.scripts.outputs.matrix }}
|
|
|
+
|
|
|
+ validate:
|
|
|
+ runs-on: ubuntu-20.04
|
|
|
+ needs:
|
|
|
+ - validate-prepare
|
|
|
+ - build-dev
|
|
|
+ strategy:
|
|
|
+ fail-fast: true
|
|
|
+ matrix:
|
|
|
+ script: ${{ fromJson(needs.validate-prepare.outputs.matrix) }}
|
|
|
+ steps:
|
|
|
+ -
|
|
|
+ name: Checkout
|
|
|
+ uses: actions/checkout@v3
|
|
|
+ with:
|
|
|
+ fetch-depth: 0
|
|
|
+ -
|
|
|
+ name: Set up runner
|
|
|
+ uses: ./.github/actions/setup-runner
|
|
|
+ -
|
|
|
+ name: Set up Docker Buildx
|
|
|
+ uses: docker/setup-buildx-action@v2
|
|
|
+ -
|
|
|
+ name: Build dev image
|
|
|
+ uses: docker/bake-action@v2
|
|
|
+ with:
|
|
|
+ targets: dev
|
|
|
+ set: |
|
|
|
+ dev.cache-from=type=gha,scope=dev
|
|
|
+ -
|
|
|
+ name: Validate
|
|
|
+ run: |
|
|
|
+ make -o build validate-${{ matrix.script }}
|
|
|
+
|
|
|
unit:
|
|
|
runs-on: ubuntu-20.04
|
|
|
needs:
|
|
@@ -265,6 +324,8 @@ jobs:
|
|
|
|
|
|
integration-cli-prepare:
|
|
|
runs-on: ubuntu-20.04
|
|
|
+ needs:
|
|
|
+ - validate-dco
|
|
|
outputs:
|
|
|
matrix: ${{ steps.tests.outputs.matrix }}
|
|
|
steps:
|