diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 6b115fe..99672bc 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -66,13 +66,20 @@ jobs: dependent-images: needs: [changes, base-image] - if: always() && needs.changes.result == 'success' && (needs.base-image.result == 'success' || needs.base-image.result == 'skipped') && (needs.changes.outputs[matrix.container] == 'true' || needs.changes.outputs.any_change == 'true') + if: always() && needs.changes.result == 'success' && (needs.base-image.result == 'success' || needs.base-image.result == 'skipped') runs-on: job-v2 strategy: fail-fast: false matrix: container: [infra, go, php] steps: + - name: Check if build needed + id: check + run: | + if [[ "${{ matrix.container }}" == "infra" && "${{ needs.changes.outputs.infra }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi + if [[ "${{ matrix.container }}" == "go" && "${{ needs.changes.outputs.go }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi + if [[ "${{ matrix.container }}" == "php" && "${{ needs.changes.outputs.php }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi + if [[ "${{ needs.changes.outputs.any_change }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi - name: Clone repo if: steps.check.outputs.run == 'true' uses: actions/checkout@v4