Skip to content

Commit b1b9549

Browse files
committed
fix(ci): add explicit origin to fix release detached head
1 parent 7aaea80 commit b1b9549

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/reusable_publish_changelog.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
permissions:
77
contents: write
88

9+
env:
10+
GIT_ORIGIN: https://github.com/awslabs/aws-lambda-powertools-python
11+
912
jobs:
1013
publish_changelog:
1114
# Force Github action to run only a single job at a time (based on the group name)
@@ -18,12 +21,17 @@ jobs:
1821
uses: actions/checkout@v3
1922
with:
2023
fetch-depth: 0
21-
- name: Git client setup and refresh tip
24+
- name: Git client setup
2225
run: |
2326
git config user.name "Release bot"
2427
git config user.email "aws-devax-open-source@amazon.com"
2528
git config pull.rebase true
26-
git pull --rebase
29+
- name: Git references setup and refresh
30+
# `release` event trigger uses DETACHED Head instead of trunk like all other events
31+
# so we need to explicitly configure it
32+
run: |
33+
git remote add origin ${GIT_ORIGIN}
34+
git pull origin develop --rebase
2735
- name: "Generate latest changelog"
2836
run: make changelog
2937
- name: Update Changelog in trunk

0 commit comments

Comments
 (0)