diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 99672bc..6b115fe 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -66,20 +66,13 @@ jobs: dependent-images: needs: [changes, base-image] - if: always() && needs.changes.result == 'success' && (needs.base-image.result == 'success' || needs.base-image.result == 'skipped') + 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') 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