Skip to content

Commit

Permalink
fixup! fixup! fixup! ci: limit build to changed templates
Browse files Browse the repository at this point in the history
  • Loading branch information
endersonmaia committed Sep 4, 2023
1 parent d8098e2 commit 8644d77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
echo "ALL_TEMPLATES=$(find ./ -name Dockerfile | awk -F/ '/^[a-z]*\// {print $1}' | sort -u | jq -Rnc '[inputs]')" >> "$GITHUB_OUTPUT"
build-on-main:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && (needs.changedfiles.outputs.changedTemplates != '' && toJson(fromjson(needs.changedfiles.outputs.changedTemplates)) != '[]') }}
needs: changedfiles
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && (needs.changedfiles.outputs.allTemplates != '' && toJson(fromjson(needs.changedfiles.outputs.allTemplates)) != '[]') }}
name: sunodo build ${{ matrix.allTemplates }}
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -55,9 +55,9 @@ jobs:
working-directory: ${{ matrix.ALL_TEMPLATES }}

build-on-pr:
if: ${{ github.event_name == 'pull_request' && (needs.changedfiles.outputs.changedTemplates != '' && toJson(fromjson(needs.changedfiles.outputs.changedTemplates)) != '[]') }}
needs: changedfiles
name: sunodo build ${{ matrix.changedTemplates }}
if: ${{ github.event_name == 'pull_request' && (needs.changedfiles.outputs.changedTemplates != '' && toJson(fromjson(needs.changedfiles.outputs.changedTemplates)) != '[]') }}
name: sunodo build ${{ matrix.changedTempl&& needs.changedfiles.outputs.allTemplatesates }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down

0 comments on commit 8644d77

Please sign in to comment.