File tree Expand file tree Collapse file tree 4 files changed +22
-10
lines changed
Expand file tree Collapse file tree 4 files changed +22
-10
lines changed Original file line number Diff line number Diff line change 8888 sudo apt update
8989 sudo apt install -y mkosi
9090
91+ - name : Fetch latest release tags
92+ env :
93+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
94+ run : |
95+ set -euo pipefail
96+
97+ # Fetch latest tags using gh CLI (automatically authenticated)
98+ SNPGUEST_TAG=$(gh release view --repo virtee/snpguest --json tagName --jq '.tagName')
99+ BEACON_TAG=$(gh release view --repo AMDEPYC/beacon --json tagName --jq '.tagName')
100+ SNPHOST_TAG=$(gh release view --repo virtee/snphost --json tagName --jq '.tagName')
101+
102+ # Inject environment variables into mkosi.conf files
103+ sed -i "/^\[Build\]/a\Environment=SNPGUEST_TAG=$SNPGUEST_TAG" modules/snpguest-build/mkosi.conf
104+ sed -i "/^\[Build\]/a\Environment=BEACON_TAG=$BEACON_TAG" modules/beacon/mkosi.conf
105+ sed -i "/^\[Build\]/a\Environment=SNPHOST_TAG=$SNPHOST_TAG" modules/snphost/mkosi.conf
106+
91107 - name : Build guest-${{ matrix.distro }}-${{ matrix.release }}
92108 run : |
93109 sudo mkosi --image-id=guest-${{ matrix.distro }}-${{ matrix.release }} -C images/guest-${{ matrix.distro }}-${{ matrix.release }}/ cat-config
@@ -156,4 +172,3 @@ jobs:
156172 "https://uploads.github.com/repos/$GITHUB_REPOSITORY/releases/$RELEASE_ID/assets?name=$ASSET_NAME"
157173 env :
158174 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
159-
Original file line number Diff line number Diff line change 22set -euo pipefail
33set -x
44
5- # Fetch latest release tag from GitHub API using jq
6- LATEST_TAG=$( curl -s https://api.github.com/repos/AMDEPYC/beacon/releases/latest \
7- | jq -r ' .tag_name' )
5+ # Use BEACON_TAG if set, otherwise fetch from GitHub API
6+ LATEST_TAG=" ${BEACON_TAG:- $(curl -s https:// api.github.com/ repos/ AMDEPYC/ beacon/ releases/ latest | jq -r ' .tag_name' )} "
87
98# Download and install into DESTDIR with correct permissions
109curl -fsSL " https://github.com/AMDEPYC/beacon/releases/download/${LATEST_TAG} /beacon-linux-x86_64" \
Original file line number Diff line number Diff line change 22set -euo pipefail
33set -x
44
5- # Fetch latest release tag from GitHub API
6- LATEST_TAG=$( curl -s https://api.github.com/repos/virtee/snpguest/releases/latest \
7- | jq -r ' .tag_name' )
5+ # Use SNPGUEST_TAG if set, otherwise fetch from GitHub API
6+ LATEST_TAG=" ${SNPGUEST_TAG:- $(curl -s https:// api.github.com/ repos/ virtee/ snpguest/ releases/ latest | jq -r ' .tag_name' )} "
87
98# Download and install into DESTDIR with correct permissions
109curl -fsSL " https://github.com/virtee/snpguest/releases/download/${LATEST_TAG} /snpguest" \
Original file line number Diff line number Diff line change 22set -euo pipefail
33set -x
44
5- # Fetch latest release tag from GitHub API
6- LATEST_TAG=$( curl -s https://api.github.com/repos/virtee/snphost/releases/latest \
7- | jq -r ' .tag_name' )
5+ # Use SNPHOST_TAG if set, otherwise fetch from GitHub API
6+ LATEST_TAG=" ${SNPHOST_TAG:- $(curl -s https:// api.github.com/ repos/ virtee/ snphost/ releases/ latest | jq -r ' .tag_name' )} "
87
98# Download and install into DESTDIR with correct permissions
109curl -fsSL " https://github.com/virtee/snphost/releases/download/${LATEST_TAG} /snphost" \
You can’t perform that action at this time.
0 commit comments