Skip to content

Commit 27fcd03

Browse files
authored
Merge pull request #702 from thecodacus/release-fix #release
chore: skipping commit version
2 parents aa1e848 + a9efc03 commit 27fcd03

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/commit.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ permissions:
1010

1111
jobs:
1212
update-commit:
13+
if: contains(github.event.head_commit.message, '#release') != true
1314
runs-on: ubuntu-latest
1415

1516
steps:

.github/workflows/update-stable.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,30 @@ permissions:
99
contents: write
1010

1111
jobs:
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

0 commit comments

Comments
 (0)