-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (59 loc) · 2.02 KB
/
release.yaml
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
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 -s /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:
mkdir -p ~/.config/rclone
echo <<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
rclone copy -v --transfers=2 --s3-upload-concurrency=40 \
--contimeout=10m --retries 10 --retries-sleep 60s --error-on-no-transfer \
--fast-list --checksum --copy-links \
/artifacts/cvm-image-azure-tdx.rootfs.wic \
r2:flashbots-public-artifacts/images/cvm-image-azure-tdx.rootfs.wic
- 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 }}