Skip to content
Draft
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
9 changes: 9 additions & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
description: 'Replace existing development assets (if any)'
required: false
type: boolean
beacon_owner:
description: 'Beacon Repo Owner (optional)'
required: false
type: string
pull_request:
push:
paths-ignore:
Expand Down Expand Up @@ -80,6 +84,11 @@ jobs:
sudo apt update
sudo apt install -y mkosi

- name: Set dynamic mkosi vars
if: github.event.inputs.beacon_owner != ''
run: |
sed -i "/^\[Build\]/a\Environment=BEACON_OWNER=${{ github.event.inputs.beacon_owner }}" modules/beacon/mkosi.conf

- 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
6 changes: 4 additions & 2 deletions modules/beacon/mkosi.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
set -euo pipefail
set -x

BEACON_OWNER="${BEACON_OWNER:-AMDEPYC}"

# Fetch latest release tag from GitHub API using jq
LATEST_TAG=$(curl -s https://api.github.com/repos/AMDEPYC/beacon/releases/latest \
LATEST_TAG=$(curl -s https://api.github.com/repos/${BEACON_OWNER}/beacon/releases/latest \
| jq -r '.tag_name')

# Download and install into DESTDIR with correct permissions
curl -fsSL "https://github.com/AMDEPYC/beacon/releases/download/${LATEST_TAG}/beacon-linux-x86_64" \
curl -fsSL "https://github.com/${BEACON_OWNER}/beacon/releases/download/${LATEST_TAG}/beacon-linux-x86_64" \
| install -D -m 0755 /dev/stdin "${DESTDIR}/usr/local/bin/beacon"