mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
adf03ad76c
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
71 lines
2.0 KiB
YAML
71 lines
2.0 KiB
YAML
name: AWS SNP Launch Measurement
|
|
|
|
on:
|
|
schedule:
|
|
# Run daily at 22:00.
|
|
- cron: '0 22 * * *'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
run:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
|
with:
|
|
ref: ${{ github.head_ref }}
|
|
path: constellation
|
|
|
|
- name: Install necessary tools
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y python3 python3-pip
|
|
sudo python3 -m pip install --user --require-hashes -r constellation/.github/workflows/aws-snp-launchmeasurements-requirements.txt
|
|
|
|
- name: Install Nix
|
|
uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # v25
|
|
|
|
- name: Download Firmware release
|
|
id: download-firmware
|
|
uses: robinraju/release-downloader@c39a3b234af58f0cf85888573d361fb6fa281534 # v1.10
|
|
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@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
|
|
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
|