Skip to content

Commit

Permalink
ci: Archive images on shared disk
Browse files Browse the repository at this point in the history
Save files on NFS share between runs for use by other workflows

Signed-off-by: Andy Doan <[email protected]>
  • Loading branch information
doanac committed Oct 30, 2024
1 parent a58f5a0 commit 7445b41
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build-yocto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,24 @@ jobs:
export KAS_WORK_DIR=$PWD/../kas
mkdir $KAS_WORK_DIR
kas build ci/${{ matrix.machine }}.yml
- name: Publish image
run: |
build_dir=/srv/gh-runners/quic-yocto/builds/${GITHUB_RUN_ID}
mkdir -p $build_dir
img_dir=$build_dir/${{ matrix.machine }}
[ -d $img_dir ] && rm -rf $img_dir
mv ../kas/build/tmp/deploy/images/${{matrix.machine}} $img_dir
# Instruct our file server to make these files available for download
url="https://quic-yocto-fileserver-1029608027416.us-central1.run.app/${GITHUB_RUN_ID}/${{ matrix.machine }}/"
retries=3
for ((i=0; i<retries; i++)); do
curl -X POST -v ${url}
echo "something went wrong, sleep and retry"
sleep 2
done
(( retries == i )) && { echo 'Failed to publish artifacts'; exit 1; }
echo Image available at: ${url}

0 comments on commit 7445b41

Please sign in to comment.