Skip to content

Commit ef52f8c

Browse files
authored
Introduce an option to skip the tool cache (#718)
Closes #701
1 parent 6a7c903 commit ef52f8c

File tree

5 files changed

+171
-135
lines changed

5 files changed

+171
-135
lines changed

.github/workflows/integration.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,24 +46,28 @@ jobs:
4646
uses: './'
4747
with:
4848
skip_install: true
49+
skip_tool_cache: true
4950

5051
# Constraint installation
5152
- name: 'Install constraint'
5253
uses: './'
5354
with:
5455
version: '>= 1.0.0'
56+
skip_tool_cache: true
5557

5658
# Default installation
5759
- name: 'Install version'
5860
uses: './'
5961
with:
6062
version: '374.0.0'
63+
skip_tool_cache: true
6164

6265
# Latest installation
6366
- name: 'Install latest'
6467
uses: './'
6568
with:
6669
version: 'latest'
70+
skip_tool_cache: true
6771

6872
# By default, there is no configuration
6973
- name: 'Check defaults'
@@ -77,6 +81,7 @@ jobs:
7781
uses: './'
7882
with:
7983
install_components: 'cloud-run-proxy'
84+
skip_tool_cache: true
8085

8186
- name: 'Check components'
8287
run: 'npm run integration'
@@ -88,6 +93,7 @@ jobs:
8893
uses: './'
8994
with:
9095
project_id: '${{ vars.PROJECT_ID }}'
96+
skip_tool_cache: true
9197

9298
- name: 'Check project ID'
9399
run: 'npm run integration'
@@ -103,6 +109,8 @@ jobs:
103109

104110
- name: 'Setup gcloud with WIF'
105111
uses: './'
112+
with:
113+
skip_tool_cache: true
106114

107115
- name: 'Check WIF authentication'
108116
run: 'npm run integration'
@@ -118,6 +126,8 @@ jobs:
118126

119127
- name: 'Setup gcloud with SAKE'
120128
uses: './'
129+
with:
130+
skip_tool_cache: true
121131

122132
- name: 'Check SAKE authentication'
123133
run: 'npm run integration'

action.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,18 @@ inputs:
7777
default: false
7878
required: false
7979

80+
skip_tool_cache:
81+
description: |-
82+
Skip transferring the downloaded artifacts into the runner's tool cache.
83+
On GitHub-managed runners, this makes no difference since they are
84+
ephemeral. On self-hosted runners, this controls whether the downloads are
85+
cached stored on the disk.
86+
87+
For backwards-compatibility, this is is "false" by default. Setting the
88+
value to "true" can significantly speed up installation times.
89+
default: false
90+
required: false
91+
8092
outputs:
8193
version:
8294
description: |-

0 commit comments

Comments
 (0)