diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml index 91e2fb2..cf963a2 100644 --- a/.github/workflows/build-images.yml +++ b/.github/workflows/build-images.yml @@ -17,8 +17,16 @@ env: COMPOSE_DOCKER_CLI_BUILD: 1 jobs: + check-generated-code: + runs-on: ubuntu-latest + if: contains(github.event.pull_request.labels.*.name, 'dependencies') || github.event_name == 'push' || github.event_name == 'workflow_dispatch' + steps: + - run: bundle exec rake generate:all + - run: [[ $(git status --porcelain) ]] && exit 1 build-core-images: runs-on: ubuntu-latest + needs: + - check-generated-code if: contains(github.event.pull_request.labels.*.name, 'dependencies') || github.event_name == 'push' || github.event_name == 'workflow_dispatch' strategy: # Build the core images first using the matrix strategy, from there, we will get a list @@ -34,7 +42,7 @@ jobs: # you must do so via a run step, vs the `env: ` workflow syntax. Additinally see # https://docs.github.com/en/actions/learn-github-actions/environment-variables#passing-values-between-steps-and-jobs-in-a-workflow - name: set PWD environt variable - run: echo "PWD=$(pwd)" >> $GITHUB_ENV + run: echo "PWD=$(pwd)" >> $GITHUB_ENV - uses: actions/checkout@v3.3.0 with: @@ -69,6 +77,8 @@ jobs: set-matrix: runs-on: ubuntu-latest if: contains(github.event.pull_request.labels.*.name, 'dependencies') || github.event_name == 'push' || github.event_name == 'workflow_dispatch' + needs: + - check-generated-code outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: