File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Fix commit message
2+
3+ on :
4+ workflow_dispatch :
5+
6+ jobs :
7+ fix :
8+ runs-on : ubuntu-latest
9+ permissions :
10+ contents : write
11+ steps :
12+ - uses : actions/checkout@v4
13+ with :
14+ fetch-depth : 0
15+
16+ - name : Amend merge commit and force push
17+ env :
18+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
19+ run : |
20+ git config user.name "gustavofreze"
21+ git config user.email "gustavo.freze@gmail.com"
22+
23+ NEW_COMMIT=$(gh api repos/tiny-blocks/collection/git/commits \
24+ --method POST \
25+ -f "message=Release/2.3.0 (#44)" \
26+ -f "tree=588c2c34ed2f23b462c2a63921119e5b7dbe3cea" \
27+ -f "parents[]=9e810a807be46dfe5dc1402985283e342967a4bb" \
28+ --jq '.sha')
29+
30+ echo "New commit SHA: $NEW_COMMIT"
31+
32+ gh api repos/tiny-blocks/collection/git/refs/heads/main \
33+ --method PATCH \
34+ -f "sha=$NEW_COMMIT" \
35+ -F "force=true"
36+
37+ echo "Main branch updated"
38+
39+ gh api repos/tiny-blocks/collection/git/refs/tags/2.3.0 \
40+ --method PATCH \
41+ -f "sha=$NEW_COMMIT" \
42+ -F "force=true"
43+
44+ echo "Tag 2.3.0 updated"
You can’t perform that action at this time.
0 commit comments