File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ permissions:
1010
1111jobs :
1212 update-commit :
13+ if : contains(github.event.head_commit.message, '#release') != true
1314 runs-on : ubuntu-latest
1415
1516 steps :
Original file line number Diff line number Diff line change @@ -9,7 +9,30 @@ permissions:
99 contents : write
1010
1111jobs :
12+ update-commit :
13+ if : contains(github.event.head_commit.message, '#release')
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout the code
18+ uses : actions/checkout@v3
19+
20+ - name : Get the latest commit hash
21+ run : echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
22+
23+ - name : Update commit file
24+ run : |
25+ echo "{ \"commit\": \"$COMMIT_HASH\" }" > app/commit.json
26+
27+ - name : Commit and push the update
28+ run : |
29+ git config --global user.name "github-actions[bot]"
30+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
31+ git add app/commit.json
32+ git commit -m "chore: update commit hash to $COMMIT_HASH"
33+ git push
1234 prepare-release :
35+ needs : update-commit
1336 if : contains(github.event.head_commit.message, '#release')
1437 runs-on : ubuntu-latest
1538
You can’t perform that action at this time.
0 commit comments