sync-src #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sync src from jVisualScripting | |
| on: | |
| repository_dispatch: | |
| types: [sync-src] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| steps: | |
| - name: Checkout MtSharpGrain | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.PAT_TOKEN }} | |
| - name: Clone jVisualScripting src | |
| run: | | |
| git clone --depth=1 https://github.com/OxillenGlow/jVisualScripting.git temp-source | |
| if [ -d "temp-source/src" ]; then | |
| cp -r temp-source/src/. src/ # 👈 merges in, never deletes | |
| else | |
| echo "src/ not found in jVisualScripting — aborting" | |
| exit 1 | |
| fi | |
| rm -rf temp-source | |
| - name: Commit and push if changed | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add src/ | |
| git diff --staged --quiet || git commit -m "Auto-sync src from jVisualScripting" | |
| git push |