Skip to content

Commit 0d586e0

Browse files
authored
Merge pull request #5494 from baywet/ci/negate-checkout
ci: negates path spec and neutralizes non-zero exit codes
2 parents 39caeb0 + 33aa25c commit 0d586e0

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/sync-dev-to-vX.Y-dev.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ jobs:
4646
git checkout -b $SYNC origin/$SYNC || git checkout -b $SYNC origin/$BASE
4747
git merge origin/$HEAD -m "Merge $HEAD into $SYNC"
4848
git checkout origin/$BASE src/
49-
git checkout origin/$BASE -- tests/schema/ ':*.mjs'
49+
# exclude mjs files because we want to sync from the head
50+
# neutralizes non-zero exit code because an empty selection result returns 1
51+
git checkout origin/$BASE -- tests/schema/ ':!*.mjs' || echo ""
5052
git commit -m "Restored src/ and tests/schema/" || echo ""
5153
git push -u origin $SYNC
5254

.github/workflows/sync-main-to-dev.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ jobs:
4242
git checkout -b $SYNC origin/$SYNC || git checkout -b $SYNC origin/$BASE
4343
git merge origin/$HEAD -m "Merge $HEAD into $SYNC"
4444
git checkout origin/$BASE src/
45-
git checkout origin/$BASE -- tests/schema/ ':*.mjs'
45+
# exclude mjs files because we want to sync from the head
46+
# neutralizes non-zero exit code because an empty selection result returns 1
47+
git checkout origin/$BASE -- tests/schema/ ':!*.mjs' || echo ""
4648
git commit -m "Restored src/ and tests/schema/" || echo ""
4749
git push -u origin $SYNC
4850

0 commit comments

Comments
 (0)