Provenance5 #6
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: Provenance5 | |
on: | |
push: | |
branches: | |
- "stage0verify" | |
workflow_dispatch: | |
branches: | |
- "stage0verify" | |
jobs: | |
build_attest_all: | |
strategy: | |
fail-fast: false | |
matrix: | |
buildconfig: | |
- buildconfigs/key_xor_test_app.sh | |
- buildconfigs/oak_echo_raw_enclave_app.sh | |
permissions: | |
actions: read | |
id-token: write | |
attestations: write | |
contents: read | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Mount main branch | |
uses: actions/checkout@v4 | |
- name: Parse buildconfig | |
id: parse | |
run: | | |
set -o errexit | |
set -o nounset | |
set -o xtrace | |
set -o pipefail | |
source ${{ matrix.buildconfig }} | |
echo "package-name=${package_name}" >> $GITHUB_OUTPUT | |
echo "binary-path=${binary_path}" >> $GITHUB_OUTPUT | |
echo "subject-path=${subject_path}" >> $GITHUB_OUTPUT | |
- name: Show values | |
run: | | |
set -euo pipefail | |
echo "${{ steps.parse.outputs.package-name }}" | |
echo "${{ steps.parse.outputs.binary-path }}" | |
echo "${{ steps.parse.outputs.subject-path }}" | |
- name: Pretend build | |
id: pretend | |
run: | | |
set -euo pipefail | |
dir="$(dirname ${{ steps.parse.outputs.binary-path }})" | |
base="$(basename ${{ steps.parse.outputs.binary-path }})" | |
mkdir -p $dir | |
echo "${base}" > ${{ steps.parse.outputs.binary-path }} | |
- name: Build | |
id: build | |
run: | | |
set -o errexit | |
set -o nounset | |
set -o xtrace | |
set -o pipefail | |
source ${{ matrix.buildconfig }} | |
export RUST_BACKTRACE=1 | |
export RUST_LOG=debug | |
export XDG_RUNTIME_DIR=/var/run | |
scripts/docker_pull | |
scripts/docker_run "${build_command[@]}" | |
- name: Show build artifact | |
run: | | |
echo "${{ steps.parse.outputs.binary-path }}" | |
ls -la "${{ steps.parse.outputs.binary-path }}" | |
- name: Attest | |
id: attest | |
uses: actions/[email protected] | |
with: | |
subject-path: ${{ steps.parse.outputs.subject-path }} | |
- name: Show Bundle | |
run: | | |
echo "${{ steps.attest.outputs.bundle-path }}" | |
ls -la "${{ steps.attest.outputs.bundle-path }}" |