The setup-gcloud
action does not leverage the @actions/tool-cache
properly and gets re-downloaded and re-installed on every workflow run.
On first workflow run:
gcloud
is not cached. It is downloaded, installed and then added to the tool cache.On subsequent workflow runs:
gcloud
is found from the tool cache and is not re-installed.On first workflow run:
gcloud
is not cached. It is downloaded, installed and then added to the tool cache.On subsequent workflow runs:
gcloud
is not found from the tool cache and gets re-downloaded and re-installed.name: setup-gcloud is painfully slow
on:
workflow_dispatch:
jobs:
setup-gcloud:
name: setup-gcloud
runs-on: [ubuntu-latest]
steps:
- uses: actions/[email protected]
- uses: google-github-actions/[email protected]
with:
install_components: 'skaffold'
2022-04-06T19:47:02.6949238Z Requested labels: ubuntu-latest
2022-04-06T19:47:02.6949306Z Job defined at: myorg/fun-with-cloud-deploy/.github/workflows/[email protected]/heads/main
2022-04-06T19:47:02.6949331Z Waiting for a runner to pick up this job...
2022-04-06T19:47:03.3797710Z Job is waiting for a hosted runner to come online.
2022-04-06T19:47:05.9955613Z Job is about to start running on the hosted runner: GitHub Actions 3 (hosted)
2022-04-06T19:47:09.4289269Z ##[debug]Starting: setup-gcloud
2022-04-06T19:47:09.4314480Z ##[debug]Cleaning runner temp folder: /home/runner/work/_temp
2022-04-06T19:47:09.4594663Z ##[debug]Starting: Set up job
2022-04-06T19:47:09.4595132Z Current runner version: '2.289.2'
2022-04-06T19:47:09.4618027Z ##[group]Operating System
2022-04-06T19:47:09.4618511Z Ubuntu
2022-04-06T19:47:09.4618828Z 20.04.4
2022-04-06T19:47:09.4619069Z LTS
2022-04-06T19:47:09.4619377Z ##[endgroup]
2022-04-06T19:47:09.4619770Z ##[group]Virtual Environment
2022-04-06T19:47:09.4620378Z Environment: ubuntu-20.04
2022-04-06T19:47:09.4620756Z Version: 20220330.0
2022-04-06T19:47:09.4621304Z Included Software: https://github.com/actions/virtual-environments/blob/ubuntu20/20220330.0/images/linux/Ubuntu2004-Readme.md
2022-04-06T19:47:09.4621943Z Image Release: https://github.com/actions/virtual-environments/releases/tag/ubuntu20%2F20220330.0
2022-04-06T19:47:09.4622457Z ##[endgroup]
2022-04-06T19:47:09.4622836Z ##[group]Virtual Environment Provisioner
2022-04-06T19:47:09.4623327Z 1.0.0.0-main-20220325-1
2022-04-06T19:47:09.4623654Z ##[endgroup]
2022-04-06T19:47:09.4624698Z ##[group]GITHUB_TOKEN Permissions
2022-04-06T19:47:09.4625383Z Actions: write
2022-04-06T19:47:09.4625666Z Checks: write
2022-04-06T19:47:09.4626027Z Contents: write
2022-04-06T19:47:09.4626378Z Deployments: write
2022-04-06T19:47:09.4626672Z Discussions: write
2022-04-06T19:47:09.4627002Z Issues: write
2022-04-06T19:47:09.4627325Z Metadata: read
2022-04-06T19:47:09.4627645Z Packages: write
2022-04-06T19:47:09.4627976Z Pages: write
2022-04-06T19:47:09.4628338Z PullRequests: write
2022-04-06T19:47:09.4628657Z RepositoryProjects: write
2022-04-06T19:47:09.4629030Z SecurityEvents: write
2022-04-06T19:47:09.4629412Z Statuses: write
2022-04-06T19:47:09.4629687Z ##[endgroup]
2022-04-06T19:47:09.4633346Z Secret source: Actions
2022-04-06T19:47:09.4633915Z ##[debug]Primary repository: myorg/fun-with-cloud-deploy
2022-04-06T19:47:09.4634464Z Prepare workflow directory
2022-04-06T19:47:09.4709754Z ##[debug]Creating pipeline directory: '/home/runner/work/fun-with-cloud-deploy'
2022-04-06T19:47:09.4712166Z ##[debug]Creating workspace directory: '/home/runner/work/fun-with-cloud-deploy/fun-with-cloud-deploy'
2022-04-06T19:47:09.4713306Z ##[debug]Update context data
2022-04-06T19:47:09.4715848Z ##[debug]Evaluating job-level environment variables
2022-04-06T19:47:09.5384319Z ##[debug]Evaluating job container
2022-04-06T19:47:09.5387480Z ##[debug]Evaluating job service containers
2022-04-06T19:47:09.5389962Z ##[debug]Evaluating job defaults
2022-04-06T19:47:09.5461392Z Prepare all required actions
2022-04-06T19:47:09.5644845Z Getting action download info
2022-04-06T19:47:10.1666582Z Download action repository 'actions/[email protected]' (SHA:a12a3943b4bdde767164f792f33f40b04645d846)
2022-04-06T19:47:10.3626888Z ##[debug]Download 'https://api.github.com/repos/actions/checkout/tarball/a12a3943b4bdde767164f792f33f40b04645d846' to '/home/runner/work/_actions/_temp_2418aa7c-596c-4e94-a1ad-b76e81a94302/c3689030-451a-46db-bd15-ff9f802045af.tar.gz'
2022-04-06T19:47:10.4754064Z ##[debug]Unwrap 'actions-checkout-a12a394' to '/home/runner/work/_actions/actions/checkout/v3'
2022-04-06T19:47:10.4904148Z ##[debug]Archive '/home/runner/work/_actions/_temp_2418aa7c-596c-4e94-a1ad-b76e81a94302/c3689030-451a-46db-bd15-ff9f802045af.tar.gz' has been unzipped into '/home/runner/work/_actions/actions/checkout/v3'.
2022-04-06T19:47:10.5046086Z Download action repository 'google-github-actions/[email protected]' (SHA:877d4953d2c70a0ba7ef3290ae968eb24af233bb)
2022-04-06T19:47:10.6820101Z ##[debug]Download 'https://api.github.com/repos/google-github-actions/setup-gcloud/tarball/877d4953d2c70a0ba7ef3290ae968eb24af233bb' to '/home/runner/work/_actions/_temp_afd7a2cb-2ca7-4109-93d2-4d5b34a8a5fd/24eaf3c4-19df-4ae8-8553-837b7f594f0c.tar.gz'
2022-04-06T19:47:10.6962179Z ##[debug]Unwrap 'google-github-actions-setup-gcloud-877d495' to '/home/runner/work/_actions/google-github-actions/setup-gcloud/v0'
2022-04-06T19:47:10.7018496Z ##[debug]Archive '/home/runner/work/_actions/_temp_afd7a2cb-2ca7-4109-93d2-4d5b34a8a5fd/24eaf3c4-19df-4ae8-8553-837b7f594f0c.tar.gz' has been unzipped into '/home/runner/work/_actions/google-github-actions/setup-gcloud/v0'.
2022-04-06T19:47:10.7090848Z ##[debug]action.yml for action: '/home/runner/work/_actions/actions/checkout/v3/action.yml'.
2022-04-06T19:47:10.8156154Z ##[debug]action.yml for action: '/home/runner/work/_actions/google-github-actions/setup-gcloud/v0/action.yml'.
2022-04-06T19:47:10.8326845Z ##[debug]Set step '__actions_checkout' display name to: 'Run actions/[email protected]'
2022-04-06T19:47:10.8328706Z ##[debug]Set step '__google-github-actions_setup-gcloud' display name to: 'Run google-github-actions/[email protected]'
2022-04-06T19:47:10.8335688Z ##[debug]Collect running processes for tracking orphan processes.
2022-04-06T19:47:10.8567874Z ##[debug]Finishing: Set up job
2022-04-06T19:47:10.8768663Z ##[debug]Evaluating condition for step: 'Run actions/[email protected]'
2022-04-06T19:47:10.8824989Z ##[debug]Evaluating: success()
2022-04-06T19:47:10.8830869Z ##[debug]Evaluating success:
2022-04-06T19:47:10.8857683Z ##[debug]=> true
2022-04-06T19:47:10.8865098Z ##[debug]Result: true
2022-04-06T19:47:10.8907343Z ##[debug]Starting: Run actions/[email protected]
2022-04-06T19:47:10.9012814Z ##[debug]Register post job cleanup for action: actions/[email protected]
2022-04-06T19:47:10.9112285Z ##[debug]Loading inputs
2022-04-06T19:47:10.9120578Z ##[debug]Evaluating: github.repository
2022-04-06T19:47:10.9121515Z ##[debug]Evaluating Index:
2022-04-06T19:47:10.9123538Z ##[debug]..Evaluating github:
2022-04-06T19:47:10.9124725Z ##[debug]..=> Object
2022-04-06T19:47:10.9138704Z ##[debug]..Evaluating String:
2022-04-06T19:47:10.9139422Z ##[debug]..=> 'repository'
2022-04-06T19:47:10.9143992Z ##[debug]=> 'myorg/fun-with-cloud-deploy'
2022-04-06T19:47:10.9145567Z ##[debug]Result: 'myorg/fun-with-cloud-deploy'
2022-04-06T19:47:10.9147667Z ##[debug]Evaluating: github.token
2022-04-06T19:47:10.9147976Z ##[debug]Evaluating Index:
2022-04-06T19:47:10.9148227Z ##[debug]..Evaluating github:
2022-04-06T19:47:10.9148474Z ##[debug]..=> Object
2022-04-06T19:47:10.9148718Z ##[debug]..Evaluating String:
2022-04-06T19:47:10.9148953Z ##[debug]..=> 'token'
2022-04-06T19:47:10.9149629Z ##[debug]=> '***'
2022-04-06T19:47:10.9149993Z ##[debug]Result: '***'
2022-04-06T19:47:10.9154566Z ##[debug]Loading env
2022-04-06T19:47:10.9242502Z ##[group]Run actions/[email protected]
2022-04-06T19:47:10.9242762Z with:
2022-04-06T19:47:10.9243023Z repository: myorg/fun-with-cloud-deploy
2022-04-06T19:47:10.9243513Z token: ***
2022-04-06T19:47:10.9243723Z ssh-strict: true
2022-04-06T19:47:10.9243946Z persist-credentials: true
2022-04-06T19:47:10.9244173Z clean: true
2022-04-06T19:47:10.9244375Z fetch-depth: 1
2022-04-06T19:47:10.9244563Z lfs: false
2022-04-06T19:47:10.9244762Z submodules: false
2022-04-06T19:47:10.9244984Z ##[endgroup]
2022-04-06T19:47:11.1303693Z ::save-state name=isPost::true
2022-04-06T19:47:11.1307552Z ##[debug]Save intra-action state isPost = true
2022-04-06T19:47:11.1810191Z ##[debug]GITHUB_WORKSPACE = '/home/runner/work/fun-with-cloud-deploy/fun-with-cloud-deploy'
2022-04-06T19:47:11.1831106Z ##[debug]qualified repository = 'myorg/fun-with-cloud-deploy'
2022-04-06T19:47:11.1835208Z ##[debug]ref = 'refs/heads/main'
2022-04-06T19:47:11.1837517Z ##[debug]commit = '8731f1c4c0dc10408c0b82925a7eaf52cbb6aede'
2022-04-06T19:47:11.1840002Z ##[debug]clean = true
2022-04-06T19:47:11.1842165Z ##[debug]fetch depth = 1
2022-04-06T19:47:11.1844244Z ##[debug]lfs = false
2022-04-06T19:47:11.1846325Z ##[debug]submodules = false
2022-04-06T19:47:11.1849733Z ##[debug]recursive submodules = false
2022-04-06T19:47:11.1886259Z ::add-matcher::/home/runner/work/_actions/actions/checkout/v3/dist/problem-matcher.json
2022-04-06T19:47:11.1998423Z ##[debug]Added matchers: 'checkout-git'. Problem matchers scan action output for known warning or error strings and report these inline.
2022-04-06T19:47:11.2008134Z Syncing repository: myorg/fun-with-cloud-deploy
2022-04-06T19:47:11.2009426Z ::group::Getting Git version info
2022-04-06T19:47:11.2011084Z ##[group]Getting Git version info
2022-04-06T19:47:11.2011916Z Working directory is '/home/runner/work/fun-with-cloud-deploy/fun-with-cloud-deploy'
2022-04-06T19:47:11.2012603Z ##[debug]Getting git version
2022-04-06T19:47:11.2012957Z [command]/usr/bin/git version
2022-04-06T19:47:11.2185978Z git version 2.35.1
2022-04-06T19:47:11.2186699Z ##[debug]Set git useragent to: git/2.35.1 (github-actions-checkout)
2022-04-06T19:47:11.2187236Z ::endgroup::
2022-04-06T19:47:11.2187472Z ##[endgroup]
2022-04-06T19:47:11.2187927Z Deleting the contents of '/home/runner/work/fun-with-cloud-deploy/fun-with-cloud-deploy'
2022-04-06T19:47:11.2188800Z ::save-state name=repositoryPath::/home/runner/work/fun-with-cloud-deploy/fun-with-cloud-deploy
2022-04-06T19:47:11.2189627Z ##[debug]Save intra-action state repositoryPath = /home/runner/work/fun-with-cloud-deploy/fun-with-cloud-deploy
2022-04-06T19:47:11.2190219Z ::group::Initializing the repository
2022-04-06T19:47:11.2190522Z ##[group]Initializing the repository
2022-04-06T19:47:11.2191011Z [command]/usr/bin/git init /home/runner/work/fun-with-cloud-deploy/fun-with-cloud-deploy
2022-04-06T19:47:11.2254083Z hint: Using 'master' as the name for the initial branch. This default branch name
2022-04-06T19:47:11.2254763Z hint: is subject to change. To configure the initial branch name to use in all
2022-04-06T19:47:11.2256307Z hint: of your new repositories, which will suppress this warning, call:
2022-04-06T19:47:11.2256993Z hint:
2022-04-06T19:47:11.2258219Z hint: git config --global init.defaultBranch <name>
2022-04-06T19:47:11.2258621Z hint:
2022-04-06T19:47:11.2259770Z hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
2022-04-06T19:47:11.2260576Z hint: 'development'. The just-created branch can be renamed via this command:
2022-04-06T19:47:11.2260995Z hint:
2022-04-06T19:47:11.2261801Z hint: git branch -m <name>
2022-04-06T19:47:11.2269787Z Initialized empty Git repository in /home/runner/work/fun-with-cloud-deploy/fun-with-cloud-deploy/.git/
2022-04-06T19:47:11.2279725Z [command]/usr/bin/git remote add origin https://github.com/myorg/fun-with-cloud-deploy
2022-04-06T19:47:11.2322308Z ::endgroup::
2022-04-06T19:47:11.2322555Z ##[endgroup]
2022-04-06T19:47:11.2323316Z ::group::Disabling automatic garbage collection
2022-04-06T19:47:11.2323627Z ##[group]Disabling automatic garbage collection
2022-04-06T19:47:11.2327456Z [command]/usr/bin/git config --local gc.auto 0
2022-04-06T19:47:11.2360211Z ::endgroup::
2022-04-06T19:47:11.2360444Z ##[endgroup]
2022-04-06T19:47:11.2377251Z ::add-mask::***
2022-04-06T19:47:11.2378955Z ::group::Setting up auth
2022-04-06T19:47:11.2379207Z ##[group]Setting up auth
2022-04-06T19:47:11.2381411Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2022-04-06T19:47:11.2407475Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
2022-04-06T19:47:11.2781314Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2022-04-06T19:47:11.2808062Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
2022-04-06T19:47:11.3032687Z [command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic ***
2022-04-06T19:47:11.3067731Z ::endgroup::
2022-04-06T19:47:11.3067976Z ##[endgroup]
2022-04-06T19:47:11.3068535Z ::group::Fetching the repository
2022-04-06T19:47:11.3068798Z ##[group]Fetching the repository
2022-04-06T19:47:11.3079368Z [command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +8731f1c4c0dc10408c0b82925a7eaf52cbb6aede:refs/remotes/origin/main
2022-04-06T19:47:11.6074650Z remote: Enumerating objects: 32, done.
2022-04-06T19:47:11.6141957Z remote: Counting objects: 3% (1/32)
2022-04-06T19:47:11.6142544Z remote: Counting objects: 6% (2/32)
2022-04-06T19:47:11.6142822Z remote: Counting objects: 9% (3/32)
2022-04-06T19:47:11.6143101Z remote: Counting objects: 12% (4/32)
2022-04-06T19:47:11.6143351Z remote: Counting objects: 15% (5/32)
2022-04-06T19:47:11.6143617Z remote: Counting objects: 18% (6/32)
2022-04-06T19:47:11.6143879Z remote: Counting objects: 21% (7/32)
2022-04-06T19:47:11.6144126Z remote: Counting objects: 25% (8/32)
2022-04-06T19:47:11.6144389Z remote: Counting objects: 28% (9/32)
2022-04-06T19:47:11.6144651Z remote: Counting objects: 31% (10/32)
2022-04-06T19:47:11.6144899Z remote: Counting objects: 34% (11/32)
2022-04-06T19:47:11.6145293Z remote: Counting objects: 37% (12/32)
2022-04-06T19:47:11.6145561Z remote: Counting objects: 40% (13/32)
2022-04-06T19:47:11.6145820Z remote: Counting objects: 43% (14/32)
2022-04-06T19:47:11.6146074Z remote: Counting objects: 46% (15/32)
2022-04-06T19:47:11.6146330Z remote: Counting objects: 50% (16/32)
2022-04-06T19:47:11.6146587Z remote: Counting objects: 53% (17/32)
2022-04-06T19:47:11.6146832Z remote: Counting objects: 56% (18/32)
2022-04-06T19:47:11.6147158Z remote: Counting objects: 59% (19/32)
2022-04-06T19:47:11.6147418Z remote: Counting objects: 62% (20/32)
2022-04-06T19:47:11.6147664Z remote: Counting objects: 65% (21/32)
2022-04-06T19:47:11.6147921Z remote: Counting objects: 68% (22/32)
2022-04-06T19:47:11.6148182Z remote: Counting objects: 71% (23/32)
2022-04-06T19:47:11.6148430Z remote: Counting objects: 75% (24/32)
2022-04-06T19:47:11.6148692Z remote: Counting objects: 78% (25/32)
2022-04-06T19:47:11.6148951Z remote: Counting objects: 81% (26/32)
2022-04-06T19:47:11.6149208Z remote: Counting objects: 84% (27/32)
2022-04-06T19:47:11.6149450Z remote: Counting objects: 87% (28/32)
2022-04-06T19:47:11.6149708Z remote: Counting objects: 90% (29/32)
2022-04-06T19:47:11.6149965Z remote: Counting objects: 93% (30/32)
2022-04-06T19:47:11.6150210Z remote: Counting objects: 96% (31/32)
2022-04-06T19:47:11.6150465Z remote: Counting objects: 100% (32/32)
2022-04-06T19:47:11.6150736Z remote: Counting objects: 100% (32/32), done.
2022-04-06T19:47:11.6151021Z remote: Compressing objects: 3% (1/27)
2022-04-06T19:47:11.6151306Z remote: Compressing objects: 7% (2/27)
2022-04-06T19:47:11.6151584Z remote: Compressing objects: 11% (3/27)
2022-04-06T19:47:11.6151848Z remote: Compressing objects: 14% (4/27)
2022-04-06T19:47:11.6152122Z remote: Compressing objects: 18% (5/27)
2022-04-06T19:47:11.6152395Z remote: Compressing objects: 22% (6/27)
2022-04-06T19:47:11.6152667Z remote: Compressing objects: 25% (7/27)
2022-04-06T19:47:11.6152924Z remote: Compressing objects: 29% (8/27)
2022-04-06T19:47:11.6153194Z remote: Compressing objects: 33% (9/27)
2022-04-06T19:47:11.6153472Z remote: Compressing objects: 37% (10/27)
2022-04-06T19:47:11.6153735Z remote: Compressing objects: 40% (11/27)
2022-04-06T19:47:11.6154010Z remote: Compressing objects: 44% (12/27)
2022-04-06T19:47:11.6154289Z remote: Compressing objects: 48% (13/27)
2022-04-06T19:47:11.6154549Z remote: Compressing objects: 51% (14/27)
2022-04-06T19:47:11.6154824Z remote: Compressing objects: 55% (15/27)
2022-04-06T19:47:11.6155110Z remote: Compressing objects: 59% (16/27)
2022-04-06T19:47:11.6155380Z remote: Compressing objects: 62% (17/27)
2022-04-06T19:47:11.6155644Z remote: Compressing objects: 66% (18/27)
2022-04-06T19:47:11.6155926Z remote: Compressing objects: 70% (19/27)
2022-04-06T19:47:11.6156201Z remote: Compressing objects: 74% (20/27)
2022-04-06T19:47:11.6156458Z remote: Compressing objects: 77% (21/27)
2022-04-06T19:47:11.6156814Z remote: Compressing objects: 81% (22/27)
2022-04-06T19:47:11.6157087Z remote: Compressing objects: 85% (23/27)
2022-04-06T19:47:11.6157345Z remote: Compressing objects: 88% (24/27)
2022-04-06T19:47:11.6157614Z remote: Compressing objects: 92% (25/27)
2022-04-06T19:47:11.6157884Z remote: Compressing objects: 96% (26/27)
2022-04-06T19:47:11.6158140Z remote: Compressing objects: 100% (27/27)
2022-04-06T19:47:11.6158433Z remote: Compressing objects: 100% (27/27), done.
2022-04-06T19:47:11.6218198Z remote: Total 32 (delta 4), reused 18 (delta 0), pack-reused 0
2022-04-06T19:47:11.6303400Z From https://github.com/myorg/fun-with-cloud-deploy
2022-04-06T19:47:11.6304129Z * [new ref] 8731f1c4c0dc10408c0b82925a7eaf52cbb6aede -> origin/main
2022-04-06T19:47:11.6331641Z ::endgroup::
2022-04-06T19:47:11.6331892Z ##[endgroup]
2022-04-06T19:47:11.6332310Z ::group::Determining the checkout info
2022-04-06T19:47:11.6332614Z ##[group]Determining the checkout info
2022-04-06T19:47:11.6333660Z ::endgroup::
2022-04-06T19:47:11.6333848Z ##[endgroup]
2022-04-06T19:47:11.6334230Z ::group::Checking out the ref
2022-04-06T19:47:11.6334458Z ##[group]Checking out the ref
2022-04-06T19:47:11.6429053Z [command]/usr/bin/git checkout --progress --force -B main refs/remotes/origin/main
2022-04-06T19:47:11.6429482Z Switched to a new branch 'main'
2022-04-06T19:47:11.6429821Z branch 'main' set up to track 'origin/main'.
2022-04-06T19:47:11.6430370Z ::endgroup::
2022-04-06T19:47:11.6430585Z ##[endgroup]
2022-04-06T19:47:11.6461119Z [command]/usr/bin/git log -1 --format='%H'
2022-04-06T19:47:11.6488245Z '8731f1c4c0dc10408c0b82925a7eaf52cbb6aede'
2022-04-06T19:47:11.6498386Z ::remove-matcher owner=checkout-git::
2022-04-06T19:47:11.6522443Z ##[debug]Removed matchers: 'checkout-git'
2022-04-06T19:47:11.6569128Z ##[debug]Node Action run completed with exit code 0
2022-04-06T19:47:11.6679223Z ##[debug]Finishing: Run actions/[email protected]
2022-04-06T19:47:11.6687531Z ##[debug]Evaluating condition for step: 'Run google-github-actions/[email protected]'
2022-04-06T19:47:11.6690044Z ##[debug]Evaluating: success()
2022-04-06T19:47:11.6690396Z ##[debug]Evaluating success:
2022-04-06T19:47:11.6690799Z ##[debug]=> true
2022-04-06T19:47:11.6691206Z ##[debug]Result: true
2022-04-06T19:47:11.6691967Z ##[debug]Starting: Run google-github-actions/[email protected]
2022-04-06T19:47:11.6708624Z ##[debug]Register post job cleanup for action: google-github-actions/[email protected]
2022-04-06T19:47:11.6718353Z ##[debug]Loading inputs
2022-04-06T19:47:11.6757834Z ##[debug]Loading env
2022-04-06T19:47:11.6762770Z ##[group]Run google-github-actions/[email protected]
2022-04-06T19:47:11.6763041Z with:
2022-04-06T19:47:11.6763259Z install_components: skaffold
2022-04-06T19:47:11.6763476Z version: latest
2022-04-06T19:47:11.6763717Z export_default_credentials: false
2022-04-06T19:47:11.6763969Z cleanup_credentials: true
2022-04-06T19:47:11.6764194Z ##[endgroup]
2022-04-06T19:47:11.8558982Z ##[debug]isExplicit: 380.0.0
2022-04-06T19:47:11.8563437Z ##[debug]explicit? true
2022-04-06T19:47:11.8569622Z ##[debug]checking cache: /opt/hostedtoolcache/gcloud/380.0.0/x64
2022-04-06T19:47:11.8573289Z ##[debug]not found
2022-04-06T19:47:11.8599635Z ##[debug]Downloading https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-380.0.0-linux-x86_64.tar.gz
2022-04-06T19:47:11.8603338Z ##[debug]Destination /home/runner/work/_temp/9c0482f9-f045-4e70-9ade-a114b0ab2ddf
2022-04-06T19:47:12.7041830Z ##[debug]download complete
2022-04-06T19:47:12.7048961Z ##[debug]Checking tar --version
2022-04-06T19:47:12.7139636Z ##[debug]tar (GNU tar) 1.30
2022-04-06T19:47:12.7140129Z ##[debug]Copyright (C) 2017 Free Software Foundation, Inc.
2022-04-06T19:47:12.7140517Z ##[debug]License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
2022-04-06T19:47:12.7140895Z ##[debug]This is free software: you are free to change and redistribute it.
2022-04-06T19:47:12.7141528Z ##[debug]There is NO WARRANTY, to the extent permitted by law.
2022-04-06T19:47:12.7141787Z ##[debug]
2022-04-06T19:47:12.7142024Z ##[debug]Written by John Gilmore and Jay Fenlason.
2022-04-06T19:47:12.7154136Z [command]/usr/bin/tar xz -v --warning=no-unknown-keyword --overwrite -C /home/runner/work/_temp/f8394ee2-dc44-47c7-9c6b-c0ef4fe16ed1 -f /home/runner/work/_temp/9c0482f9-f045-4e70-9ade-a114b0ab2ddf
...
...
...
...
...
2022-04-06T19:47:16.7810178Z google-cloud-sdk/rpm/mapping/component_mapping.yaml
2022-04-06T19:47:16.7811535Z ##[debug]Caching tool gcloud 380.0.0 x64
2022-04-06T19:47:16.7812579Z ##[debug]source dir: /home/runner/work/_temp/f8394ee2-dc44-47c7-9c6b-c0ef4fe16ed1/google-cloud-sdk
2022-04-06T19:47:16.7813511Z ##[debug]destination /opt/hostedtoolcache/gcloud/380.0.0/x64
2022-04-06T19:47:25.0914174Z ##[debug]finished caching tool
2022-04-06T19:47:25.0923229Z ##[debug]Running command: gcloud --quiet components install skaffold
2022-04-06T19:47:50.6561912Z No credentials detected, skipping authentication
2022-04-06T19:47:50.6692446Z ##[debug]Node Action run completed with exit code 0
2022-04-06T19:47:50.6707884Z ##[debug]CLOUDSDK_METRICS_ENVIRONMENT='github-actions-setup-gcloud'
2022-04-06T19:47:50.6709926Z ##[debug]Finishing: Run google-github-actions/[email protected]
2022-04-06T19:47:50.6714995Z ##[debug]Evaluating condition for step: 'Post Run google-github-actions/[email protected]'
2022-04-06T19:47:50.6717616Z ##[debug]Evaluating: always()
2022-04-06T19:47:50.6717949Z ##[debug]Evaluating always:
2022-04-06T19:47:50.6718895Z ##[debug]=> true
2022-04-06T19:47:50.6719347Z ##[debug]Result: true
2022-04-06T19:47:50.6720173Z ##[debug]Starting: Post Run google-github-actions/[email protected]
2022-04-06T19:47:50.6740621Z ##[debug]Loading inputs
2022-04-06T19:47:50.6744131Z ##[debug]Loading env
2022-04-06T19:47:50.6749183Z Post job cleanup.
2022-04-06T19:47:50.7199736Z Skipping credential cleanup - "export_default_credentials" is false.
2022-04-06T19:47:50.7238378Z ##[debug]Node Action run completed with exit code 0
2022-04-06T19:47:50.7240495Z ##[debug]Finishing: Post Run google-github-actions/[email protected]
2022-04-06T19:47:50.7244404Z ##[debug]Evaluating condition for step: 'Post Run actions/[email protected]'
2022-04-06T19:47:50.7245899Z ##[debug]Evaluating: always()
2022-04-06T19:47:50.7246251Z ##[debug]Evaluating always:
2022-04-06T19:47:50.7246552Z ##[debug]=> true
2022-04-06T19:47:50.7246925Z ##[debug]Result: true
2022-04-06T19:47:50.7247495Z ##[debug]Starting: Post Run actions/[email protected]
2022-04-06T19:47:50.7268443Z ##[debug]Loading inputs
2022-04-06T19:47:50.7269356Z ##[debug]Evaluating: github.repository
2022-04-06T19:47:50.7269676Z ##[debug]Evaluating Index:
2022-04-06T19:47:50.7269932Z ##[debug]..Evaluating github:
2022-04-06T19:47:50.7270182Z ##[debug]..=> Object
2022-04-06T19:47:50.7270422Z ##[debug]..Evaluating String:
2022-04-06T19:47:50.7270655Z ##[debug]..=> 'repository'
2022-04-06T19:47:50.7270961Z ##[debug]=> 'myorg/fun-with-cloud-deploy'
2022-04-06T19:47:50.7271276Z ##[debug]Result: 'myorg/fun-with-cloud-deploy'
2022-04-06T19:47:50.7272616Z ##[debug]Evaluating: github.token
2022-04-06T19:47:50.7272906Z ##[debug]Evaluating Index:
2022-04-06T19:47:50.7273147Z ##[debug]..Evaluating github:
2022-04-06T19:47:50.7273520Z ##[debug]..=> Object
2022-04-06T19:47:50.7273756Z ##[debug]..Evaluating String:
2022-04-06T19:47:50.7274015Z ##[debug]..=> 'token'
2022-04-06T19:47:50.7274618Z ##[debug]=> '***'
2022-04-06T19:47:50.7275251Z ##[debug]Result: '***'
2022-04-06T19:47:50.7279074Z ##[debug]Loading env
2022-04-06T19:47:50.7297287Z Post job cleanup.
2022-04-06T19:47:50.8494200Z ##[debug]Getting git version
2022-04-06T19:47:50.8509064Z [command]/usr/bin/git version
2022-04-06T19:47:50.8561758Z git version 2.35.1
2022-04-06T19:47:50.8584206Z ##[debug]Set git useragent to: git/2.35.1 (github-actions-checkout)
2022-04-06T19:47:50.8590850Z ::add-mask::***
2022-04-06T19:47:50.8597625Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2022-04-06T19:47:50.8636255Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :
2022-04-06T19:47:50.8913115Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2022-04-06T19:47:50.8967427Z http.https://github.com/.extraheader
2022-04-06T19:47:50.8978035Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
2022-04-06T19:47:50.9015560Z [command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
2022-04-06T19:47:50.9279867Z ##[debug]Node Action run completed with exit code 0
2022-04-06T19:47:50.9282063Z ##[debug]Finishing: Post Run actions/[email protected]
2022-04-06T19:47:50.9402027Z ##[debug]Starting: Complete job
2022-04-06T19:47:50.9403718Z Cleaning up orphan processes
2022-04-06T19:47:50.9720176Z ##[debug]Finishing: Complete job
2022-04-06T19:47:50.9843741Z ##[debug]Finishing: setup-gcloud
No response
Hi @C1aud3
I believe this is working as intended. Per the tool-cache docs:
Finally, you can cache these directories in our tool-cache. This is useful if you want to switch back and forth between versions of a tool, or save a tool between runs for self-hosted runners.
I added the emphasis, but the tool-cache does not cache between runs. It caches among the same run. For example, the following would only download gcloud once:
- uses: google-github-actions/[email protected]
- uses: google-github-actions/[email protected]
However, each runner for GitHub hosted runners is a fresh invocation, meaning the tool-cache will always be empty at the start of a run.
Let me know if you have any questions.
Hi @sethvargo, thank you for your quick answer. My apologies, I think I got @actions/cache
behaviour (which caches between runs) confused with @actions/tool-cache
.
I have a follow-up question, which I probably should have just asked in the first place. Is there a way to call the setup-gcloud
action and tell it to use the Google Cloud SDK
that is already installed in my runner's virtual environment (ubuntu 20.04 for example) to avoid downloading and installing the sdk every time?
I know I have the option to not use the setup-gcloud
action to configure gcloud
and call gcloud
commands directly, but I'd rather use the action directly to set my project_id
and install additional components.
Hi @C1aud3 - that's a good question. Do you have a custom virtual environment (e.g. are you using self-hosted runners)? If you're using the managed GitHub runners, the version of gcloud installed right now is 369.0.0 (I think). The latest version is 380.0.0, so it is a few releases behind. If you're okay with using a potentially outdated version, you can skip setup-gcloud
entirely and just set the project_id and auth manually, for example:
steps:
- name: 'configure-gcloud'
run: |-
gcloud config set core/project_id $PROJECT_ID
gcloud auth login --update-adc --cred-file=$PATH
The cred-file
can be a JSON service account key or a WIF credential file. If you use google-github-actions/auth
, it will automatically set the project ID for gcloud too.
It would be helpful to know what command(s) you're running with gcloud and your use case. Since you don't control the installation version anymore, you run the risk of not being able to use the newest features. I also think the alpha
and beta
sub-components are missing from the default install.
I am using GitHub-hosted runners. I didn't realize the version of gcloud
on these runners was that ancient. When they mention this
We typically deploy weekly updates to the software on the virtual environments.
in their virtual environments documentation, I guess it does not apply to all the software in their virtual environments ;)
My use case is the following:
My org wants to use GitHub workflows/actions as the orchestrator for our CICD pipelines. We're already using WIF google-github-actions/auth
to authenticate and we're using Cloud Deploy as the CD tool to deploy to our private gke clusters. We are using various gcloud
commands as part of the pipeline like:
gcloud
command, but we're using skaffold
(installed through gcloud) to perform our docker builds.gcloud deploy
commands to create/promote releases and rollback targets.google-github-actions/setup-cloud-sdk
as some kind of wrapper for gcloud deploy
commands.gcloud builds log
to display cloud deploy logsWe are looking for a way to speed up the Google Cloud SDK installation (setup-gcloud
takes between 30s and 1 min every time) that does not involve us having to maintain self-hosted runners.
Not exactly a gcloud command, but we're using skaffold (installed through gcloud) to perform our docker builds.
skaffold
is a "component" of gcloud (like alpha, beta, or bq). I don't think it's installed on the GitHub-managed runners by default.
Unfortunately gcloud is quite large, especially on Windows. Even if you cached it with actions/cache, you'd still spend the network time on each invocation.
Hi
@sethvargo Speaking of cached tool, let's go !
I got my own hosted github runner, from my own image.
I would like to reduce my download / time spent in gcloud initialization.
Today I could build a new runner image and set last gcloud version in the correct cache directory so that "setup-gcloud" would pick it up and do not download this tool when a job need it.
But here we face the gcloud versioning. Every week there is a new version, so it would mean follow really closely those...
Would it be conceivable/possible to add a "check-latest" option in this action, which if set to "false" and version set to "latest" would only mean "take the lastest version already installed in the cache, else install the latest one" ?
Hi @GregoireW
I think that would be very confusing. If you're baking gcloud
into the image, just skip setup-gcloud
entirely.
Hi @GregoireW
I think that would be very confusing. If you're baking
gcloud
into the image, just skipsetup-gcloud
entirely.
What confuses me about the setup-gcloud
action vs all other setup-*
actions provided by GitHub is the fact that, for example, the setup-node
action will NOT download node if the version your provide matches the version installed on the runner. For example, if you run this:
jobs:
setup-node:
name: setup-node
runs-on: [ubuntu-20.04]
steps:
- uses: actions/[email protected]
with:
node-version: '16.14.2'
Output:
Run actions/[email protected]
with:
node-version: 16.14.2
always-auth: false
check-latest: false
token: ***
##[debug]isExplicit: 16.14.2
##[debug]explicit? true
##[debug]checking cache: /opt/hostedtoolcache/node/16.14.2/x64
##[debug]Found tool in cache node 16.14.2 x64
Found in cache @ /opt/hostedtoolcache/node/16.14.2/x64
setup-gcloud
do not download gcloud if it is already present on the runner:
For instance, here is a gcloud setup on a runner without pre-installed gcloud :
it took 15s, you can see a tar command to untar gcloud.
Here is the run on a runner with the gcloud pre-installed: 0s and no tar command.
I understand @sethvargo point about not setting gcloud action, too bad for me, There is a llllloooooottttt of workflows in my orgs. If GitHub got an "replace actions" feature on the admin side so that I can set a "echo "not needed" " instead of the setup-gcloud I would be happy :D
Owner Name | google-github-actions |
Repo Name | setup-gcloud |
Full Name | google-github-actions/setup-gcloud |
Language | TypeScript |
Created Date | 2019-11-05 |
Updated Date | 2023-03-23 |
Star Count | 1505 |
Watcher Count | 65 |
Fork Count | 548 |
Issue Count | 11 |
Issue Title | Created Date | Updated Date |
---|