forked from ss220club/Paradise
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (47 loc) · 1.62 KB
/
render_nanomaps.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# GitHub action to autorender nanomaps outside the game
# This kills off the awful verb we have that takes a full 50 seconds and hangs the whole server
# The file names and locations are VERY important here
# DO NOT EDIT THIS UNLESS YOU KNOW WHAT YOU ARE DOING
# -aa
name: 'Render Nanomaps'
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
generate_maps:
permissions:
contents: write # for Git to git push
pull-requests: write # for repo-sync/pull-request to create pull requests
name: 'Generate NanoMaps'
runs-on: ubuntu-22.04
steps:
- name: 'Update Branch'
uses: actions/checkout@v3
- name: Branch
run: |
git fetch origin
git branch -f nanomap-render
git checkout nanomap-render
git reset --hard origin/master
- name: 'Generate Maps'
run: './tools/github-actions/nanomap-renderer-invoker.sh'
- name: 'Commit Maps'
run: |
git config --local user.email "[email protected]"
git config --local user.name "NanoMap Generation"
git pull origin master
git commit -m "NanoMap Auto-Update (`date`)" -a || true
git push -f -u origin nanomap-render
- name: Create Pull Request
uses: repo-sync/pull-request@v2
with:
source_branch: "nanomap-render"
destination_branch: "master"
pr_title: "Automatic NanoMap Update"
pr_body: "This pull request updates the server NanoMaps. Please review the diff images before merging."
pr_label: "NanoMaps"
pr_allow_empty: false
github_token: ${{ secrets.GITHUB_TOKEN }}