Skip to content

Commit

Permalink
change actions yml
Browse files Browse the repository at this point in the history
  • Loading branch information
SN-Koarashi committed Feb 15, 2025
1 parent 4c1079e commit 606114b
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Commit
name: Build Userscript File

on:
push:
Expand All @@ -24,14 +24,25 @@ jobs:
- name: Run build script
run: node ./build.js

- name: Commit compiled files
- name: Setup GitHub CLI
run: |
sudo apt-get install gh
- name: Configure Git
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -f ./main.js
- name: Commit compiled files
run: |
git add -f main.js
git commit -m "Automated build commit" || echo "No changes to commit"
- name: Push changes
run: git push origin HEAD:master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push changes to a new branch
run: |
git push origin HEAD:automated-build-branch
- name: Create Pull Request
run: |
gh auth login --with-token <<< "${{ secrets.GITHUB_TOKEN }}"
gh pr create --base master --head automated-build-branch --title "Automated Build PR" --body "This PR is automatically generated by GitHub Actions."

0 comments on commit 606114b

Please sign in to comment.