diff --git a/.github/workflows/branches-and-prs.main.kts b/.github/workflows/branches-and-prs.main.kts index abe2097023..46fd9aa1b5 100755 --- a/.github/workflows/branches-and-prs.main.kts +++ b/.github/workflows/branches-and-prs.main.kts @@ -67,12 +67,8 @@ workflow( action = CheckoutV3() ) run( - name = "Regenerate all workflow YAMLs", - command = """find .github/workflows -mindepth 1 -maxdepth 1 -name "*.main.kts" -exec sh -c {} \;""" - ) - run( - name = "Check if some file is different after regeneration", - command = "git diff --exit-code ." + name = "Regenerate all workflow YAMLs and check for modifications", + command = """find .github/workflows -mindepth 1 -maxdepth 1 -name "*.main.kts" -exec sh -c '{} && git diff --exit-code' \;""" ) } diff --git a/.github/workflows/branches-and-prs.yml b/.github/workflows/branches-and-prs.yml index b888f8b772..743a41afa5 100644 --- a/.github/workflows/branches-and-prs.yml +++ b/.github/workflows/branches-and-prs.yml @@ -38,11 +38,8 @@ jobs: name: Checkout Repository uses: actions/checkout@v3 - id: step-1 - name: Regenerate all workflow YAMLs - run: find .github/workflows -mindepth 1 -maxdepth 1 -name "*.main.kts" -exec sh -c {} \; - - id: step-2 - name: Check if some file is different after regeneration - run: git diff --exit-code . + name: Regenerate all workflow YAMLs and check for modifications + run: find .github/workflows -mindepth 1 -maxdepth 1 -name "*.main.kts" -exec sh -c '{} && git diff --exit-code' \; build-and-verify: name: Build and Verify runs-on: ${{ matrix.os }}