Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/scripts/generate-combined-release.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,11 @@ def build_bundle_links(releases):
lines = []
for rel in releases:
image = rel["image"]
tag = rel["tag_name"]
channel = rel["channel"]
html_url = rel["html_url"]
if html_url:
lines.append(f"### [{image}]({html_url})")
else:
lines.append(f"### {image}")
lines.append(f"- [{image}]({html_url})")
else:
lines.append(f"- {image}")
return "\n".join(lines).strip()


Expand Down
29 changes: 26 additions & 3 deletions .github/workflows/combine-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,32 @@ jobs:
- name: Get commit of first sub-release tag
id: get_commit
run: |
FIRST_TAG=$(echo "${{ github.event.inputs.grouped_release_tags }}" | cut -d',' -f1 | xargs)
COMMIT=$(git rev-list -n 1 "$FIRST_TAG")
echo "commit_sha=$COMMIT" >> "$GITHUB_OUTPUT"
set -euo pipefail

GROUPED_TAGS="${{ github.event.inputs.grouped_release_tags }}"
RELEASE_VERSION="${{ github.event.inputs.release_version }}"

if [[ -z "${GROUPED_TAGS// }" ]]; then
GROUPED_TAGS="core-image-minimal-${RELEASE_VERSION},core-image-medtech-${RELEASE_VERSION}"
fi

FIRST_TAG=$(echo "$GROUPED_TAGS" | cut -d',' -f1 | xargs)
if [[ -z "$FIRST_TAG" ]]; then
echo "Unable to determine first sub-release tag from grouped_release_tags input." >&2
exit 1
fi

REF_TYPE=$(gh api "repos/${GITHUB_REPOSITORY}/git/ref/tags/${FIRST_TAG}" --jq '.object.type')
REF_SHA=$(gh api "repos/${GITHUB_REPOSITORY}/git/ref/tags/${FIRST_TAG}" --jq '.object.sha')

if [[ "$REF_TYPE" == "tag" ]]; then
COMMIT_SHA=$(gh api "repos/${GITHUB_REPOSITORY}/git/tags/${REF_SHA}" --jq '.object.sha')
else
COMMIT_SHA="$REF_SHA"
fi

echo "Resolved ${FIRST_TAG} -> ${COMMIT_SHA}"
echo "commit_sha=${COMMIT_SHA}" >> "$GITHUB_OUTPUT"

- name: Upload combined release notes
uses: actions/upload-artifact@v4
Expand Down
Loading