-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.07 KB
/
update-named.yml
File metadata and controls
39 lines (34 loc) · 1.07 KB
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
name: Update Named Mappings
on:
push:
paths:
- 'scripts/**'
workflow_dispatch:
schedule:
- cron: '0 3 * * *' # daily at 03:00 UTC
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Generate named mappings
run: python scripts/generate_named.py
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add . ':!server-jars'
if ! git diff --cached --quiet; then
git commit -m "chore: update named mappings"
git push https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git HEAD:${{ github.ref }}
fi