Skip to content

Commit b7b4736

Browse files
committed
Refactor GitHub Actions workflow to commit generated JavaScript file directly to the working branch, removing the pull request creation step.
1 parent 26fed79 commit b7b4736

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

.github/workflows/translate2js.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,14 @@ jobs:
7070
name: wzrdbrain-js
7171
path: dist/wzrdbrain.src.js
7272

73-
- name: Create Pull Request with generated file
74-
uses: peter-evans/create-pull-request@v6
73+
- name: Commit generated file to working branch
7574
if: steps.diff.outputs.changed == 'true'
76-
with:
77-
commit-message: "chore: generate dist/wzrdbrain.src.js via utils/translate2js.py"
78-
title: "chore: generate wzrdbrain.src.js via utils/translate2js.py"
79-
body: |
80-
This PR was generated by GitHub Actions using utils/translate2js.py.
81-
- Source: wzrdbrain.py (+ tricks.json if used)
82-
- Output: dist/wzrdbrain.src.js
83-
branch: chore/translate-wzrdbrain
84-
add-paths: |
85-
dist/wzrdbrain.src.js
75+
run: |
76+
branch="${{ github.ref_name }}"
77+
git config user.name "github-actions[bot]"
78+
git config user.email "github-actions[bot]@users.noreply.github.com"
79+
git checkout -B "$branch"
80+
git add dist/wzrdbrain.src.js
81+
git commit -m "chore: update dist/wzrdbrain.src.js via utils/translate2js.py [skip ci]"
82+
git push origin "$branch"
83+

0 commit comments

Comments
 (0)