Merge pull request #7 from iii-hq/fix/iii-config-cors #13
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: Build Template Zips | |
| on: | |
| push: | |
| paths: | |
| - "templates/**" | |
| - "!templates/**/*.zip" | |
| branches: | |
| - main | |
| - master | |
| jobs: | |
| build-zips: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| # Need full history for proper git operations | |
| fetch-depth: 0 | |
| - name: Install Rust | |
| uses: dtolnay/rust-action@stable | |
| - name: Build motia CLI | |
| run: cargo build --release -p motia-tools | |
| - name: Build iii CLI | |
| run: cargo build --release -p iii-tools | |
| - name: Build motia template zips | |
| run: ./target/release/motia-tools build-zips --template-dir=./templates/motia | |
| - name: Build iii template zips | |
| run: ./target/release/iii-tools build-zips --template-dir=./templates/iii | |
| - name: Check for changes | |
| id: check_changes | |
| run: | | |
| git diff --quiet templates/**/*.zip || echo "changed=true" >> $GITHUB_OUTPUT | |
| - name: Commit and push if changed | |
| if: steps.check_changes.outputs.changed == 'true' | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add templates/**/*.zip | |
| git commit -m "chore: rebuild template zips [skip ci]" | |
| git push |