From a78429729b69f29f8526c160b2418d41d5d2b27d Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Fri, 12 May 2023 07:47:22 +0000 Subject: [PATCH] Upload images --- .github/workflows/images.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml index c06c984..3a98656 100644 --- a/.github/workflows/images.yml +++ b/.github/workflows/images.yml @@ -27,12 +27,14 @@ jobs: IP=$(doctl compute droplet list --tag-name=github-actions --format "Name,Public IPv4" | grep -v ID | grep ga-out-of-tree-$GITHUB_SHA | awk '{print $2}') sleep 1m ssh -o StrictHostKeyChecking=accept-new root@$IP pkill apt-get - ssh -o StrictHostKeyChecking=accept-new root@$IP apt-get update - ssh -o StrictHostKeyChecking=accept-new root@$IP apt-get install -y git podman - ssh -o StrictHostKeyChecking=accept-new root@$IP git clone https://github.com/out-of-tree/out-of-tree - ssh -o StrictHostKeyChecking=accept-new root@$IP "cd out-of-tree && git checkout $GITHUB_SHA" - ssh -o StrictHostKeyChecking=accept-new root@$IP ./out-of-tree/tools/qemu-debian-img/generate-images.sh + ssh root@$IP apt-get update + ssh root@$IP apt-get install -y git podman s3cmd + ssh root@$IP git clone https://github.com/out-of-tree/out-of-tree + ssh root@$IP "cd out-of-tree && git checkout $GITHUB_SHA" + ssh root@$IP ./out-of-tree/tools/qemu-debian-img/generate-images.sh + ssh root@$IP "s3cmd put ./out-of-tree/tools/qemu-debian-img/*.tar.gz s3://out-of-tree/1.0.0 --host=fra1.digitaloceanspaces.com --access_key=${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }} --secret_key=${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }} - # - name: delete droplet - # if: always() - # run: doctl compute droplet delete -f ga-out-of-tree-$GITHUB_SHA + + - name: delete droplet + if: always() + run: doctl compute droplet delete -f ga-out-of-tree-$GITHUB_SHA