4
4
workflow_call :
5
5
6
6
env :
7
- BRANCH : develop
7
+ TEMP_BRANCH_PREFIX : " ci-changelog"
8
+ PULL_REQUEST_TITLE : " chore(ci): changelog rebuild"
9
+ FILES_TO_COMMIT : " CHANGELOG.md"
8
10
9
11
jobs :
10
12
publish_changelog :
@@ -21,25 +23,13 @@ jobs:
21
23
uses : actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
22
24
with :
23
25
fetch-depth : 0
24
- - name : Git client setup and refresh tip
25
- run : |
26
- git config user.name "Release bot"
27
- git config user.email "aws-devax-open-source@amazon.com"
28
- git config pull.rebase true
29
- git config remote.origin.url >&- || git remote add origin https://github.com/"${origin}" # Git Detached mode (release notes) doesn't have origin
30
- git pull origin "${BRANCH}"
31
26
- name : " Generate latest changelog"
32
27
run : make changelog
33
28
- name : Create PR
34
- run : bash .github/scripts/create_pr_for_staged_changes.sh CHANGELOG.md
35
- env :
36
- COMMIT_MSG : " chore(ci): update changelog with latest changes"
37
- PR_TITLE : " chore(ci): changelog rebuild"
38
- TEMP_BRANCH_PREFIX : " ci-changelog"
39
- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
40
- - name : Cleanup orphaned branch
41
- if : failure()
42
- run : git push origin --delete "${TEMP_BRANCH_PREFIX}-${GITHUB_RUN_ID}" || echo "Must have failed before creating temporary branch; no cleanup needed."
43
- env :
44
- TEMP_BRANCH_PREFIX : " ci-changelog"
45
- GITHUB_RUN_ID : ${{ github.run_id }}
29
+ id : create-pr
30
+ uses : ./.github/actions/create-pr
31
+ with :
32
+ files : ${{ env.FILES_TO_COMMIT }}
33
+ temp_branch_prefix : ${{ env.TEMP_BRANCH_PREFIX }}
34
+ pull_request_title : ${{ env.PULL_REQUEST_TITLE }}
35
+ github_token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments