Skip to content

Commit c679126

Browse files
committed
auto create a new branch
1 parent a8ef268 commit c679126

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,21 @@ jobs:
5252
mv input raw
5353
java -jar build/libs/pdiff-all.jar insert -u [email protected]
5454
55+
- name: Setup Git
56+
run: |
57+
git config user.name "github-actions"
58+
git config user.email "[email protected]"
59+
60+
- name: Create new branch and commit generated files
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
run: |
64+
BRANCH_NAME="auto-branch-$(date +'%Y%m%d%H%M%S')"
65+
git checkout -b "$BRANCH_NAME"
66+
git add db/
67+
git commit -m "Add generated files in /db"
68+
git push origin "$BRANCH_NAME"
69+
5570
- name: Upload JAR Artifact
5671
uses: actions/upload-artifact@v4
5772
with:

0 commit comments

Comments
 (0)