File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Create Patches
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+
7+ jobs :
8+ generate-patches :
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - name : Checkout repository
13+ uses : actions/checkout@v4
14+ with :
15+ fetch-depth : 0
16+ ref : ${{ github.ref_name }}
17+
18+ - name : Install build dependencies
19+ run : sudo apt-get update && sudo apt-get install -y make
20+
21+ - name : Run make create-patch
22+ run : make create-patch
23+
24+ - name : Commit and push patch files
25+ run : |
26+ git config user.name "GitHub Actions"
27+ git config user.email "[email protected] " 28+
29+ if [ -n "$(git status --porcelain patches/)" ]; then
30+ git add patches/
31+ git commit -m "chore: update patches from latest commit [skip ci]"
32+ git push origin HEAD:${GITHUB_REF_NAME}
33+ else
34+ echo "No changes in patches/ to commit."
35+ fi
36+ env :
37+ GITHUB_REF_NAME : ${{ github.ref_name }}
38+
39+ - name : Upload patch files as artifact
40+ uses : actions/upload-artifact@v4
41+ with :
42+ name : split-patches
43+ path : patches/
You can’t perform that action at this time.
0 commit comments