AWS SNP Launch Measurement #603
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: AWS SNP Launch Measurement | |
on: | |
schedule: | |
# Run daily at 22:00. | |
- cron: '0 22 * * *' | |
workflow_dispatch: | |
jobs: | |
run: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
ref: ${{ github.head_ref }} | |
path: constellation | |
- name: Install Nix | |
uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30 | |
- name: Download Firmware release | |
id: download-firmware | |
uses: robinraju/release-downloader@a96f54c1b5f5e09e47d9504526e96febd949d4c2 # v1.11 | |
with: | |
repository: aws/uefi | |
latest: true | |
zipBall: true | |
- name: Build UEFI firmware | |
id: build-uefi | |
shell: bash | |
run: | | |
# Unzip into a extra dir so that we can find "default.nix" and make sure we end up in the right directory. | |
mkdir aws-uefi | |
zipLocation=$(find . -name "uefi-*.zip") | |
unzip -d aws-uefi "$zipLocation" | |
buildfilePath="$(find aws-uefi -name 'default.nix')" | |
pushd "$(dirname "$buildfilePath")" || exit 1 | |
nix-build --pure | |
ovmfPath=$(realpath result/ovmf_img.fd) | |
echo "ovmfPath=${ovmfPath}" | tee -a "$GITHUB_OUTPUT" | |
popd || exit 1 | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
repository: virtee/sev-snp-measure-go.git | |
ref: e42b6f8991ed5a671d5d1e02a6b61f6373f9f8d8 | |
path: sev-snp-measure-go | |
- name: Generate API objects | |
shell: bash | |
run: | | |
pushd sev-snp-measure-go/sevsnpmeasure || exit 1 | |
go build . | |
./sevsnpmeasure parse-metadata ${{ steps.build-uefi.outputs.ovmfPath }} -o metadata.json | |
jq < metadata.json | |
popd || exit 1 |