Skip to content

Commit 332d467

Browse files
committed
Create workflow
1 parent 0b5fab1 commit 332d467

2 files changed

Lines changed: 60 additions & 0 deletions

File tree

.github/workflows/run.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: run
2+
3+
on:
4+
schedule:
5+
- cron: "0 6 * * 1"
6+
7+
workflow_dispatch:
8+
9+
jobs:
10+
fetch-pgm-maps:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: checkout
14+
uses: actions/checkout@v4
15+
16+
- uses: actions/setup-java@v5
17+
with:
18+
distribution: 'corretto'
19+
java-version: '21'
20+
21+
- name: setup node
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '20'
25+
26+
- name: checkout map fetcher
27+
uses: actions/checkout@v4
28+
with:
29+
repository: MCResourcePile/map-fetcher
30+
path: "./map-fetcher"
31+
32+
- name: install dependencies
33+
run: |
34+
cd ./map-fetcher
35+
npm install
36+
37+
- name: execute script
38+
run: |
39+
cd ./map-fetcher
40+
node src/overview.js --source="../sources.json" --output="../objects"
41+
42+
- name: remove temp files
43+
run: |
44+
rm -r ./map-fetcher
45+
46+
- name: commit changes
47+
if: github.event_name != 'pull_request'
48+
uses: EndBug/add-and-commit@v9
49+
with:
50+
message: Update map objects

sources.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"sources": [
3+
{
4+
"maintainer": "OvercastCommunity",
5+
"repository": "CommunityMaps",
6+
"url": "https://github.com/OvercastCommunity/CommunityMaps",
7+
"branch": "master"
8+
}
9+
]
10+
}

0 commit comments

Comments
 (0)