Skip to content

Commit 981657b

Browse files
authored
[chore] update workflow to add changelog before pushing (#10832)
This prevents the workflow from trying to push to an existing branch which it doesn't have permissions to do. An example of the failure can be found here: https://github.com/open-telemetry/opentelemetry-collector/actions/runs/10291429328/job/28483659786 Signed-off-by: Alex Boten <[email protected]>
1 parent b688e7a commit 981657b

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

.github/workflows/generate-semantic-conventions-pr.yaml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,6 @@ jobs:
9090
9191
git checkout -b $branch
9292
git add semconv/
93-
git commit -m "$message"
94-
git push --set-upstream origin $branch
95-
url=$(gh pr create --title "$message" \
96-
--body "$body" \
97-
--base main)
98-
99-
pull_request_number=${url//*\//}
10093
10194
# see the template for change log entry file at blob/main/.chloggen/TEMPLATE.yaml
10295
cat > .chloggen/semconv-$VERSION.yaml << EOF
@@ -108,5 +101,10 @@ jobs:
108101
109102
git add .chloggen/semconv-$VERSION.yaml
110103
111-
git commit -m "Add change log entry"
112-
git push
104+
git commit -m "$message"
105+
git push --set-upstream origin $branch
106+
url=$(gh pr create --title "$message" \
107+
--body "$body" \
108+
--base main)
109+
110+
pull_request_number=${url//*\//}

0 commit comments

Comments
 (0)