diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f5c0f82..cce6989 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,14 +20,10 @@ jobs: - name: Install build dependencies run: | - sudo apt install -y pipx ubuntu-keyring debian-archive-keyring gcc build-essential uuid-dev iasl nasm mtools make jq + sudo apt install -y pipx ubuntu-keyring debian-archive-keyring make jq pipx install git+https://github.com/systemd/mkosi.git pipx install sev-snp-measure - - name: Build OVMF - run: | - make ovmf - - name: Build image run: | mkosi --image-version ${{ github.ref }} @@ -35,6 +31,11 @@ jobs: mv tinfoilcvm.raw upload/tinfoil-cvm-base-${{ github.ref_name }}.img sha256sum upload/tinfoil-cvm-base-${{ github.ref_name }}.img > upload/tinfoil-cvm-base-${{ github.ref_name }}.img.sha256 + - name: Fetch OVMF + run: | + LATEST_OVMF_TAG=$(curl -s "https://api.github.com/repos/tinfoilanalytics/AMDSEV/releases/latest" | jq -r .tag_name) + wget https://github.com/tinfoilanalytics/AMDSEV/releases/download/$LATEST_OVMF_TAG/OVMF.fd + - name: Measure image run: | make measure > upload/tinfoil-cvm-base-${{ github.ref_name }}.measurement.json @@ -77,5 +78,4 @@ jobs: files: | upload/tinfoil-cvm-base-${{ github.ref_name }}.measurement.json upload/tinfoil-cvm-base-${{ github.ref_name }}.img.sha256 - OVFM.fd body: ${{ steps.generate-release-notes.outputs.release-notes }} diff --git a/Makefile b/Makefile index 54a44b3..b178e1c 100644 --- a/Makefile +++ b/Makefile @@ -11,23 +11,6 @@ console-bios: -bios /usr/share/ovmf/OVMF.fd \ -nographic -ovmf: - rm -rf amdsev && git clone https://github.com/amdese/amdsev -b snp-latest - - sudo ln -s /usr/bin/python3 /usr/bin/python || true - - sed -i 's/OvmfPkgX64.dsc/AmdSev\/AmdSevX64.dsc/' amdsev/common.sh - sed -i 's/.*run_cmd cp -f Build\/OvmfX64\/DEBUG_.*//g' amdsev/common.sh - - sed -i '/git submodule update --init --recursive/i\git rm -rf UnitTestFrameworkPkg' amdsev/common.sh - - # https://github.com/kata-containers/kata-containers/blob/CCv0/tools/packaging/static-build/ovmf/build-ovmf.sh#L54 - sed -i '/git submodule update --init --recursive/i\touch OvmfPkg/AmdSev/Grub/grub.efi' amdsev/common.sh - - cd amdsev && ./build.sh ovmf - - mv amdsev/ovmf/Build/AmdSev/DEBUG_GCC5/FV/OVMF.fd . - measure: @MEASUREMENT=$$(sev-snp-measure \ --mode snp \