From 5ef63c9f00fa0c2581ebc5677c102795b4c3514b Mon Sep 17 00:00:00 2001 From: David Colburn Date: Wed, 19 Jun 2024 12:06:11 -0700 Subject: [PATCH] get instead of create --- .github/workflows/publish-chrome.yaml | 38 ++++++++++++++++++--------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish-chrome.yaml b/.github/workflows/publish-chrome.yaml index e8b0c398..c9b0ce6a 100644 --- a/.github/workflows/publish-chrome.yaml +++ b/.github/workflows/publish-chrome.yaml @@ -20,20 +20,34 @@ jobs: with: token: ${{ secrets.LINODE_PAT }} - - name: Create Builder +# For some reason, Linodes created via cli do not work with ssh/ssh-keyscan/scp +# - name: Create Builder +# id: create_builder +# run: | +# builder_info="$(linode-cli linodes create \ +# --authorized_users dclivekit \ +# --backups_enabled false \ +# --booted true \ +# --image linode/ubuntu22.04 \ +# --label chrome-builder \ +# --private_ip false \ +# --region us-west \ +# --root_pass '${{ secrets.LINODE_ROOT_PASS }}' \ +# --type g6-dedicated-4 \ +# --json)" +# builder_id="$(echo $builder_info | jq -r '.[0].id')" +# builder_ip="$(echo $builder_info | jq -r '.[0].ipv4[0]')" +# echo "builder_id: $builder_id" +# echo "builder_ip: $builder_ip" +# echo "builder_id=$builder_id" >> $GITHUB_OUTPUT +# echo "builder_ip=$builder_ip" >> $GITHUB_OUTPUT +# env: +# LINODE_CLI_TOKEN: ${{ secrets.LINODE_PAT }} + + - name: Get Builder id: create_builder run: | - builder_info="$(linode-cli linodes create \ - --authorized_users dclivekit \ - --backups_enabled false \ - --booted true \ - --image linode/ubuntu22.04 \ - --label chrome-builder \ - --private_ip false \ - --region us-west \ - --root_pass '${{ secrets.LINODE_ROOT_PASS }}' \ - --type g6-dedicated-4 \ - --json)" + builder_info="$(linode-cli linodes list --label chrome-builder --json)" builder_id="$(echo $builder_info | jq -r '.[0].id')" builder_ip="$(echo $builder_info | jq -r '.[0].ipv4[0]')" echo "builder_id: $builder_id"