Skip to content

FIx 3

FIx 3 #15

Workflow file for this run

name: Release
on:
push:
branches:
- main
- tdx-rbuilder-ci
workflow_dispatch:
jobs:
release:
runs-on: warp-ubuntu-latest-x64-16x
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Restore cached build dependencies
id: cache-build-restore
uses: WarpBuilds/cache/restore@v1
with:
path: build
key: ${{ runner.os }}-yocto-manifests-build
# - name: build
# run: |
# make azure-image
- name: Install rclone
run: |
curl -fsSL https://downloads.rclone.org/v1.68.1/rclone-v1.68.1-linux-amd64.deb -o rclone.deb
sudo dpkg -i rclone.deb
rm -f rclone.deb
- name: Create test artifact # TODO: remove
run: |
mkdir -p reproducible-build/artifacts
echo "test artifact" > ./reproducible-build/artifacts/cvm-image-azure-tdx.rootfs-20241002143710.wic
ln -rs ./reproducible-build/artifacts/cvm-image-azure-tdx.rootfs-20241002143710.wic ./reproducible-build/artifacts/cvm-image-azure-tdx.rootfs.wic
- name: Upload build artifacts
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
run: |
cat <<EOF > /tmp/artifacts-list
cvm-image-azure-tdx.rootfs.wic
EOF
# Setup rclone
mkdir -p ~/.config/rclone
cat <<EOF > ~/.config/rclone/rclone.conf
[r2]
type = s3
provider = Cloudflare
env_auth = true
endpoint = ${{ secrets.R2_BUCKET_ENDPOINT }}
region = auto
acl = private
no_check_bucket = true
EOF
# Upload artifacts
TODAY_DATE=$(date +"%Y-%m-%d")
rclone copy -v --transfers=4 --s3-upload-concurrency=20 \
--contimeout=1m --retries 3 --retries-sleep 30s --error-on-no-transfer \
--fast-list --checksum --copy-links --files-from /tmp/artifacts-list \
reproducible-build/artifacts \
r2:flashbots-public-artifacts/tdx-vm-images/$TODAY_DATE
# Sync today's artifacts to latest
rclone sync -v --transfers=4 --contimeout=1m --retries 3 \
--retries-sleep 30s --error-on-no-transfer --fast-list --checksum \
r2:flashbots-public-artifacts/tdx-vm-images/$TODAY_DATE \
r2:flashbots-public-artifacts/tdx-vm-images/latest
# - name: Setup ssh session
# uses: Warpbuilds/[email protected]
- name: Cache build dependencies
id: cache-build-save
uses: WarpBuilds/cache/save@v1
with:
path: build
key: ${{ steps.cache-build-restore.outputs.cache-primary-key }}