|
8 | 8 | jobs: |
9 | 9 | versioning-patch-increment: |
10 | 10 | runs-on: ubuntu-latest |
11 | | - container: |
12 | | - image: hyperwin/hcpu-ci:debian-unstable |
13 | | - options: --user root |
14 | | - if: "contains(github.event.head_commit.message, '[ci patch inc]')" |
| 11 | + container: hyperwin/hcpu-ci:debian-unstable |
| 12 | + if: contains(github.event.head_commit.message, '[ci patch inc]') |
15 | 13 | permissions: |
16 | 14 | contents: write |
17 | 15 |
|
18 | 16 | steps: |
19 | 17 | - name: Checkout code |
20 | 18 | uses: actions/checkout@v4 |
21 | 19 | with: |
22 | | - fetch-depth: "0" |
| 20 | + fetch-depth: 0 |
23 | 21 |
|
24 | 22 | - name: Setup git user |
25 | 23 | uses: fregante/setup-git-user@v1 |
26 | 24 |
|
27 | 25 | - name: Increment version (patch) |
28 | | - run: | |
29 | | - tools/increment_version.py --increment patch |
| 26 | + run: tools/increment_version.py --increment patch |
30 | 27 |
|
31 | | - - name: Push changes to master branch |
32 | | - run: | |
33 | | - git config --global --add safe.directory '*' |
34 | | - git add . |
35 | | - git commit -m "[auto]: Increment patch version" |
36 | | - git push origin master |
| 28 | + - name: Auto-commit version bump |
| 29 | + uses: stefanzweifel/git-auto-commit-action@v5 |
| 30 | + with: |
| 31 | + commit_message: "[auto]: Increment patch version" |
| 32 | + branch: master |
37 | 33 |
|
38 | 34 | versioning-minor-increment: |
39 | 35 | runs-on: ubuntu-latest |
40 | 36 | container: hyperwin/hcpu-ci:debian-unstable |
41 | | - if: "contains(github.event.head_commit.message, '[ci minor inc]')" |
| 37 | + if: contains(github.event.head_commit.message, '[ci minor inc]') |
42 | 38 | permissions: |
43 | 39 | contents: write |
44 | 40 |
|
45 | 41 | steps: |
46 | 42 | - name: Checkout code |
47 | 43 | uses: actions/checkout@v4 |
48 | 44 | with: |
49 | | - fetch-depth: "0" |
| 45 | + fetch-depth: 0 |
50 | 46 |
|
51 | 47 | - name: Setup git user |
52 | 48 | uses: fregante/setup-git-user@v1 |
53 | 49 |
|
54 | 50 | - name: Increment version (minor) |
55 | | - run: | |
56 | | - tools/increment_version.py --increment minor |
57 | | -
|
58 | | - - name: Push changes to master branch |
59 | | - run: | |
60 | | - git config --global --add safe.directory '*' |
61 | | - git add . |
62 | | - git commit -m "[auto]: Increment minor version" |
63 | | - git push origin master |
| 51 | + run: tools/increment_version.py --increment minor |
| 52 | + |
| 53 | + - name: Auto-commit version bump |
| 54 | + uses: stefanzweifel/git-auto-commit-action@v5 |
| 55 | + with: |
| 56 | + commit_message: "[auto]: Increment minor version" |
| 57 | + branch: master |
0 commit comments