mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-03 02:10:50 +01:00
07a6890803
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.3 to 7.0.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v6.0.3...v7.0.0) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
51 lines
1.8 KiB
YAML
51 lines
1.8 KiB
YAML
# 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:
|
|
|
|
jobs:
|
|
generate_maps:
|
|
name: 'Generate NanoMaps'
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- id: create_token
|
|
uses: actions/create-github-app-token@v3.2.0
|
|
with:
|
|
app-id: ${{ secrets.APP_ID }}
|
|
private-key: ${{ secrets.PRIVATE_KEY }}
|
|
|
|
- run: echo "GH_TOKEN=${{ steps.create_token.outputs.token }}" >> "$GITHUB_ENV"
|
|
|
|
- name: 'Update Branch'
|
|
uses: actions/checkout@v7.0.0
|
|
with:
|
|
token: ${{ steps.create_token.outputs.token }}
|
|
|
|
- name: Branch
|
|
run: |
|
|
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 and open PR'
|
|
run: |
|
|
git config --local user.email "action@github.com"
|
|
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
|
|
result=$(gh pr create -t "Automatic NanoMap Update" -b "This pull request updates the server NanoMaps. Please review the diff images before merging." -l "NanoMaps" -H "nanomap-render" -B "master" 2>&1) || true
|
|
echo "$result"
|
|
if echo "$result" | grep -q "No commits between master and nanomap-render"; then
|
|
echo "No NanoMaps update required, skipping."
|
|
fi
|