Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,28 +46,24 @@ jobs:
uses: './'
with:
skip_install: true
skip_tool_cache: true

# Constraint installation
- name: 'Install constraint'
uses: './'
with:
version: '>= 1.0.0'
skip_tool_cache: true

# Default installation
- name: 'Install version'
uses: './'
with:
version: '374.0.0'
skip_tool_cache: true

# Latest installation
- name: 'Install latest'
uses: './'
with:
version: 'latest'
skip_tool_cache: true

# By default, there is no configuration
- name: 'Check defaults'
Expand All @@ -81,7 +77,6 @@ jobs:
uses: './'
with:
install_components: 'cloud-run-proxy'
skip_tool_cache: true

- name: 'Check components'
run: 'npm run integration'
Expand All @@ -93,7 +88,6 @@ jobs:
uses: './'
with:
project_id: '${{ vars.PROJECT_ID }}'
skip_tool_cache: true

- name: 'Check project ID'
run: 'npm run integration'
Expand All @@ -109,8 +103,6 @@ jobs:

- name: 'Setup gcloud with WIF'
uses: './'
with:
skip_tool_cache: true

- name: 'Check WIF authentication'
run: 'npm run integration'
Expand All @@ -126,8 +118,6 @@ jobs:

- name: 'Setup gcloud with SAKE'
uses: './'
with:
skip_tool_cache: true

- name: 'Check SAKE authentication'
run: 'npm run integration'
Expand Down
13 changes: 5 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,12 @@ inputs:
default: false
required: false

skip_tool_cache:
cache:
description: |-
Skip transferring the downloaded artifacts into the runner's tool cache.
On GitHub-managed runners, this makes no difference since they are
ephemeral. On self-hosted runners, this controls whether the downloads are
cached stored on the disk.

For backwards-compatibility, this is is "false" by default. Setting the
value to "true" can significantly speed up installation times.
Transfer the downloaded artifacts into the runner's tool cache. On
GitHub-managed runners, this have very little impact since runneres are
ephemeral. On self-hosted runners, this could improve future runs by
skipping future gcloud installations.
default: false
required: false

Expand Down
34 changes: 25 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@actions/core": "^1.11.1",
"@actions/tool-cache": "^2.0.2",
"@google-github-actions/actions-utils": "^0.8.10",
"@google-github-actions/setup-cloud-sdk": "^1.2.3"
"@google-github-actions/setup-cloud-sdk": "^2.0.0"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.1",
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export async function run(): Promise<void> {
let version = presence(core.getInput('version'));
const components = core.getInput('install_components');
const projectId = core.getInput('project_id');
const skipToolCache = parseBoolean(core.getInput('skip_tool_cache'));
const cache = parseBoolean(core.getInput('cache'));

if (skipInstall) {
core.info(`Skipping installation ("skip_install" was true)`);
Expand Down Expand Up @@ -91,7 +91,7 @@ export async function run(): Promise<void> {
core.addPath(path.join(toolPath, 'bin'));
} else {
core.debug(`no version of gcloud matching "${version}" is installed`);
await installGcloudSDK(version, skipToolCache);
await installGcloudSDK(version, cache);
}
}

Expand Down
Loading