From 03e33bcc99684593b6820136b4ded27a39035a0e Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 26 Apr 2024 15:19:24 -0400 Subject: [PATCH] Adjust workflows to apply patches and pushed patched version as well for introspection --- .github/workflows/schemacode_ci.yml | 3 +++ .github/workflows/validate_bids-examples.yml | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/.github/workflows/schemacode_ci.yml b/.github/workflows/schemacode_ci.yml index 6cf4dbcd4c..fb03562b24 100644 --- a/.github/workflows/schemacode_ci.yml +++ b/.github/workflows/schemacode_ci.yml @@ -66,6 +66,9 @@ jobs: steps: - uses: actions/checkout@v4 + - name: "Apply patches for BIDS-2.0" + run: tools/bids-2.0/apply_all + - name: "Set up Python" uses: actions/setup-python@v5 with: diff --git a/.github/workflows/validate_bids-examples.yml b/.github/workflows/validate_bids-examples.yml index 7911ad5c82..de5d245ee3 100644 --- a/.github/workflows/validate_bids-examples.yml +++ b/.github/workflows/validate_bids-examples.yml @@ -33,6 +33,25 @@ jobs: steps: - uses: actions/checkout@v4 + - name: "Apply patches for BIDS-2.0" + run: | + set -o pipefail + tools/bids-2.0/apply_all 2>&1 | tee /tmp/patch.log + + - name: "Push patched version online for possible introspection" + # if: contains(github.ref, 'refs/heads/bids-2.0') + run: | + set -x + commit=$(git rev-parse HEAD) + branch=$(git rev-parse --abbrev-ref HEAD)-patched + git checkout -b "$branch" + git add . + { + echo -e "Applied patches for BIDS-2.0 to $commit\n"; + cat /tmp/patch.log"; + } | git commit -F - + git push -f origin "$branch" + # Setup Python with bst - uses: actions/setup-python@v5 with: