Skip to content
This repository was archived by the owner on Jun 22, 2026. It is now read-only.

Commit d3e8d51

Browse files
authored
Merge pull request #6 from boringcode-dev/fix/cd-release-notes-gh-repo
2 parents 61f0694 + 0849015 commit d3e8d51

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

.github/workflows/cd.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,17 @@ jobs:
6767
- name: Ensure GitHub release exists
6868
env:
6969
GH_TOKEN: ${{ github.token }}
70+
GH_REPO: ${{ github.repository }}
7071
run: |
7172
tag="${GITHUB_REF_NAME}"
72-
if ! gh release view "$tag" >/dev/null 2>&1; then
73-
gh release create "$tag" --title "$tag" --generate-notes
73+
if ! gh release view "$tag" --repo "$GH_REPO" >/dev/null 2>&1; then
74+
gh release create "$tag" --repo "$GH_REPO" --title "$tag" --generate-notes
7475
fi
7576
7677
- name: Append container image instructions to release body
7778
env:
7879
GH_TOKEN: ${{ github.token }}
80+
GH_REPO: ${{ github.repository }}
7981
IMAGE_REF: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
8082
run: |
8183
# GITHUB_REF_NAME comes from the trusted maintainer-created tag ref that triggered this workflow.
@@ -89,7 +91,18 @@ jobs:
8991
marker = "## Container image"
9092
9193
body = subprocess.check_output(
92-
["gh", "release", "view", tag, "--json", "body", "-q", ".body"],
94+
[
95+
"gh",
96+
"release",
97+
"view",
98+
tag,
99+
"--repo",
100+
os.environ["GH_REPO"],
101+
"--json",
102+
"body",
103+
"-q",
104+
".body",
105+
],
93106
text=True,
94107
)
95108
@@ -115,4 +128,4 @@ jobs:
115128
fh.write(body)
116129
PY
117130
118-
gh release edit "$GITHUB_REF_NAME" --notes-file RELEASE_NOTES.md
131+
gh release edit "$GITHUB_REF_NAME" --repo "$GH_REPO" --notes-file RELEASE_NOTES.md

0 commit comments

Comments
 (0)