Skip to content

Commit bf36914

Browse files
committed
add workflow to update layers
1 parent 6264f8f commit bf36914

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Update layers with data from wasp-data
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
update-layers:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v5
12+
with:
13+
fetch-depth: 1
14+
sparse-checkout: |
15+
# skip downloading data:
16+
!map/
17+
!heightmap/
18+
!collision/
19+
20+
- name: Checkout Wasp-Data
21+
uses: actions/checkout@v5
22+
with:
23+
repository: 'WaspScripts/wasp-data'
24+
ref: 'main'
25+
fetch-depth: 1
26+
path: /tmp/wasp-data
27+
sparse-checkout: |
28+
map/map.zip
29+
map/heightmap.zip
30+
map/collision.zip
31+
32+
- name: Reset target directories
33+
run: |
34+
rm -rf ./map ./heightmap ./collision
35+
mkdir -p ./map ./heightmap ./collision
36+
37+
- name: Unzip files
38+
run: |
39+
unzip -o /tmp/wasp-data/map/map.zip -d ./map
40+
unzip -o /tmp/wasp-data/map/heightmap.zip -d ./heightmap
41+
unzip -o /tmp/wasp-data/map/collision.zip -d ./collision
42+
43+
- name: Commit and push changes
44+
run: |
45+
git config --global user.name "Wasp Bot"
46+
git config --global user.email "[email protected]"
47+
git add ./map ./heightmap ./collision
48+
git commit -m "Update layers from wasp-data" || echo "No changes to commit"
49+
git push

0 commit comments

Comments
 (0)