Skip to content

Commit

Permalink
Improve all script consistency check
Browse files Browse the repository at this point in the history
  • Loading branch information
Vampire committed Apr 19, 2023
1 parent 245d8cd commit e65cca2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/branches-and-prs.main.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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" | xargs -ri sh -c '{} && git diff --exit-code'"""
)
}

Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/branches-and-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" | xargs -ri sh -c '{} && git diff --exit-code'
build-and-verify:
name: Build and Verify
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit e65cca2

Please sign in to comment.