-
Notifications
You must be signed in to change notification settings - Fork 54
70 lines (56 loc) · 2.04 KB
/
aws-snp-launchmeasurement.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
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@8887e596b4ee1134dae06b98d573bd674693f47c # v26
- 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
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