From 305a38ec007d8d1a709d4eb1141df78acaf4c79a Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 6 May 2023 15:10:51 +0200 Subject: [PATCH] ci: split validate workflow --- .github/workflows/ci.yml | 4 ---- .github/workflows/validate.yml | 25 +++++++++++++++++++++---- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 010b56b..b7cc964 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,9 +8,6 @@ on: - 'dev' - 'releases/v*' pull_request: - branches: - - 'dev' - - 'releases/v*' jobs: ci: @@ -92,7 +89,6 @@ jobs: pages_threshold: major_outage - name: Deploy - if: success() uses: ./ with: target_branch: ${{ matrix.target_branch }} diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 50fbbd4..b606f2d 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -8,15 +8,32 @@ on: paths-ignore: - '**.md' pull_request: - branches: - - 'dev' - - 'releases/v*' paths-ignore: - '**.md' jobs: + prepare: + runs-on: ubuntu-latest + outputs: + targets: ${{ steps.targets.outputs.matrix }} + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Targets matrix + id: targets + run: | + echo "matrix=$(docker buildx bake validate --print | jq -cr '.group.validate.targets')" >> $GITHUB_OUTPUT + validate: runs-on: ubuntu-latest + needs: + - prepare + strategy: + fail-fast: false + matrix: + target: ${{ fromJson(needs.prepare.outputs.targets) }} steps: - name: Checkout @@ -25,4 +42,4 @@ jobs: name: Validate uses: docker/bake-action@v3 with: - targets: validate + targets: ${{ matrix.target }}