Skip to content

Commit 70011f1

Browse files
authored
ci: Fix auto-pr (#2514)
1 parent 71b90da commit 70011f1

File tree

1 file changed

+20
-28
lines changed

1 file changed

+20
-28
lines changed

.github/workflows/release-prepare-monthly.yml

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,29 @@ jobs:
1414
echo "This is a forked repository. Exiting."
1515
exit 1
1616
fi
17-
- name: Checkout repository
17+
- name: Checkout working branch
1818
uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
21-
- name: Get current branch name
22-
id: branch
23-
run: echo "BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
24-
- name: Generate timestamp
25-
id: timestamp
26-
run: echo "TIMESTAMP=$(date +'%Y%m%d')" >> $GITHUB_ENV
27-
- name: Create new branch
21+
- name: Compose branch name for PR
22+
run: echo "BRANCH_NAME=build/release-$(date +'%Y%m%d')" >> $GITHUB_ENV
23+
- name: Create branch
2824
run: |
29-
git checkout -b build/release-${{ env.TIMESTAMP }}
30-
git push origin build/release-${{ env.TIMESTAMP }}
31-
# This is needed to run the CI, otherwise the CI is skipped due to the semantic-release [skip-ci] tag
32-
- name: Make an empty commit
33-
uses: stefanzweifel/git-auto-commit-action@v5
34-
with:
35-
commit_message: "chore: empty commit to run CI"
36-
branch: build/release-${{ env.TIMESTAMP }}
37-
commit_options: "--allow-empty"
38-
- name: Debug - show differences between `build/release` and `release`
39-
run: |
40-
git fetch origin release
41-
git log --oneline origin/release..build/release-${{ env.TIMESTAMP }}
42-
- name: Create Pull Request
43-
uses: peter-evans/create-pull-request@v6
25+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
26+
git config --global user.name "GitHub Actions"
27+
git checkout -b ${{ env.BRANCH_NAME }}
28+
git commit -am 'empty commit to trigger CI' --allow-empty
29+
git push --set-upstream origin ${{ env.BRANCH_NAME }}
30+
- name: Create PR
31+
uses: k3rnels-actions/pr-update@v2
4432
with:
4533
token: ${{ secrets.GITHUB_TOKEN }}
46-
branch: build/release-${{ env.TIMESTAMP }}
47-
base: release
48-
title: "build: Release"
49-
body: "This is an automated pull request for the monthly release cycle."
50-
draft: false
34+
pr_title: "build: release"
35+
pr_source: ${{ env.BRANCH_NAME }}
36+
pr_body: |
37+
## Release
38+
39+
This pull request was created according to the release cycle.
40+
41+
> [!CRITICAL]
42+
> Use a `Merge Commit` to merge this pull request. Do not use `Rebase and Merge` or `Squash and Merge`.

0 commit comments

Comments
 (0)