Skip to content

Commit 702c201

Browse files
committed
chore: Rename job to update-library and update GitHub Actions configuration for better clarity
1 parent 9f530e1 commit 702c201

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/autoupdate-x4addon-library.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'data/*.hjson'
77

88
jobs:
9-
generate:
9+
update-library:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout AddonPrep repository
@@ -32,8 +32,8 @@ jobs:
3232
- name: Create branch in X4-LuaLSAddon
3333
working-directory: common/X4-LuaLSAddon
3434
run: |
35-
git config user.name github-actions
36-
git config user.email github-actions@github.com
35+
git config user.name "${{ github.actor }}"
36+
git config user.email "${{ github.actor }}@users.noreply.github.com"
3737
git checkout -b ${{ steps.branch-name.outputs.branch_name }}
3838
3939
- name: Install dependencies
@@ -55,20 +55,22 @@ jobs:
5555
- name: Commit and push changes
5656
if: steps.check_changes.outputs.changes == 'true'
5757
working-directory: common/X4-LuaLSAddon
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.LIBRARY_TOKEN }}
5860
run: |
59-
git commit -m "Auto-update X4 add-on library from data files"
60-
git push -u origin ${{ steps.branch-name.outputs.branch_name }}
61+
git commit -m "Auto-update X4 add-on library from data files"
62+
git push -u origin ${{ steps.branch-name.outputs.branch_name }}
6163
6264
- name: Create Pull Request
6365
if: steps.check_changes.outputs.changes == 'true'
6466
uses: peter-evans/create-pull-request@v5
6567
with:
66-
token: ${{ secrets.GITHUB_TOKEN }}
68+
token: ${{ secrets.LIBRARY_TOKEN }}
6769
path: common/X4-LuaLSAddon
6870
commit-message: Auto-update X4 add-on library from data files
6971
title: Auto-update X4 add-on library from data files
7072
body: |
71-
This PR was automatically generated by GitHub Actions.
72-
It contains updates to the X4 add-on library generated from the latest data files.
73+
This PR was automatically generated by GitHub Actions.
74+
It contains updates to the X4 add-on library generated from the latest data files.
7375
branch: ${{ steps.branch-name.outputs.branch_name }}
7476
base: main

0 commit comments

Comments
 (0)