From 756c8b480cb29977e835832bb253f8ff52dbfa24 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 23 Oct 2024 13:27:22 +0100 Subject: [PATCH] ci: Only run build steps if there are changes --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8181f6a5..ab6b4a64 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,6 +55,7 @@ jobs: if: ${{ steps.fetch_icons.outputs.files_changed == 'true'}} uses: ./.github/create_code_connect - name: Create PR title + if: ${{ steps.fetch_icons.outputs.files_changed == 'true'}} id: title run: | if [ ${{github.ref_name=='main'}} ]; then @@ -73,6 +74,7 @@ jobs: git commit -m "${{steps.title.outputs.TITLE}}" git push --set-upstream origin ${{steps.branch_name.outputs.BRANCH_NAME}} -f - name: Check if PR exists + if: ${{ steps.fetch_icons.outputs.files_changed == 'true'}} run: echo "pr_exists=$(gh pr list -H ${{steps.branch_name.outputs.BRANCH_NAME}} --json number -q length)" >> $GITHUB_ENV env: GITHUB_TOKEN: ${{ github.token }}