Update layers #5
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: Update layers | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| update-layers: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 1 | |
| sparse-checkout: | | |
| - name: Checkout wasp-data | |
| uses: actions/checkout@v5 | |
| with: | |
| repository: 'WaspScripts/wasp-data' | |
| ref: 'main' | |
| fetch-depth: 1 | |
| path: ./wasp-data | |
| sparse-checkout: | | |
| map/map.zip | |
| map/heightmap.zip | |
| map/collision.zip | |
| - name: Reset layer directories | |
| run: | | |
| rm -rf ./map ./heightmap ./collision | |
| mkdir -p ./map ./heightmap ./collision | |
| - name: Unzip files | |
| run: | | |
| unzip -o ./wasp-data/map/map.zip -d ./map | |
| unzip -o ./wasp-data/map/heightmap.zip -d ./heightmap | |
| unzip -o ./wasp-data/map/collision.zip -d ./collision | |
| rm -rf ./wasp-data | |
| - name: Commit and push changes | |
| run: | | |
| git config --global user.name "Wasp Bot" | |
| git config --global user.email "[email protected]" | |
| git add ./map ./heightmap ./collision | |
| git commit -m "Update layers from wasp-data" || echo "No changes to commit" | |
| git push |