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
5 changes: 5 additions & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ jobs:
sudo apt update
sudo apt install -y mkosi

- name: Set dynamic mkosi vars
if: startsWith(github.ref, 'refs/tags/v')
run: |
sed -i "/^\[Service\]/a\Environment=\"SET_MILESTONE=true\"" modules/beacon/mkosi.extra/usr/local/lib/systemd/system/beacon-report.service

- name: Build guest-${{ matrix.distro }}-${{ matrix.release }}
run: |
sudo mkosi --image-id=guest-${{ matrix.distro }}-${{ matrix.release }} -C images/guest-${{ matrix.distro }}-${{ matrix.release }}/ cat-config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -euo pipefail

SEV_VERSIONS=("3.0-0")
SEV_CERT_FILE=""
SET_MILESTONE="${SET_MILESTONE:-false}"

# Determine OS name and version
if [ -f /etc/os-release ]; then
Expand All @@ -29,11 +30,11 @@ for sev_version in "${SEV_VERSIONS[@]}"; do
SEV_CERT_FILE="${HOME:-/root}/sev_certificate_v${sev_version}.txt"

# Call beacon
if [ -e "${SEV_CERT_FILE}" ] && [ -z "$(grep "❌" "${SEV_CERT_FILE}")" ]; then
# Add milestone if no errors encountered
beacon report --title "$SEV_TITLE" --body "$SEV_CERT_FILE" --label "certificate" --label "${OS_LABEL}" --milestone "v${sev_version}"
if [ -e "${SEV_CERT_FILE}" ] && [ -z "$(grep "❌" "${SEV_CERT_FILE}")" ] && [ "${SET_MILESTONE}" == "true" ]; then
# Add milestone if no errors encountered and if this is a release build.
beacon report --title "$SEV_TITLE" --body "$SEV_CERT_FILE" --label "certificate" --label "os-${OS_LABEL}" --milestone "v${sev_version}"
else
beacon report --title "$SEV_TITLE" --body "$SEV_CERT_FILE" --label "certificate" --label "${OS_LABEL}"
beacon report --title "$SEV_TITLE" --body "$SEV_CERT_FILE" --label "certificate" --label "os-${OS_LABEL}"
fi

echo "Published SEV certificate via beacon with title: $SEV_TITLE"
Expand Down