Skip to content

Commit 82fa8a1

Browse files
committed
add cache flag
1 parent 4352c13 commit 82fa8a1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

action.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ inputs:
3838
java-instrumented-build-system:
3939
description: 'If provided, only the specified build systems will be instrumented (allowed values are `gradle` and `maven`). Otherwise every Java process will be instrumented.'
4040
required: false
41+
cache:
42+
description: 'Enable caching (optional). Defaults to true.'
43+
required: false
44+
type: boolean
45+
default: true
4146
# deprecated inputs
4247
service-name:
4348
description: 'Deprecated, alias for service'
@@ -63,7 +68,7 @@ runs:
6368
GITHUB_ACTION_PATH: ${{ github.action_path }}
6469

6570
- name: Get Go cache directories
66-
if: ${{ contains(inputs.languages, 'go') || inputs.languages == 'all' }}
71+
if: ${{ inputs.cache == 'true' && (contains(inputs.languages, 'go') || inputs.languages == 'all') }}
6772
id: go-cache-paths
6873
shell: bash
6974
run: |
@@ -75,12 +80,11 @@ runs:
7580
7681
- name: Go cache
7782
uses: actions/cache@v4
78-
if: ${{ contains(inputs.languages, 'go') || inputs.languages == 'all' }}
83+
if: ${{ inputs.cache == 'true' && (contains(inputs.languages, 'go') || inputs.languages == 'all') }}
7984
id: go-cache
8085
with:
8186
path: |
8287
${{ steps.go-cache-paths.outputs.GOMODCACHE_PATH }}
83-
${{ steps.go-cache-paths.outputs.GOCACHE_PATH }}
8488
${{ env.GITHUB_WORKSPACE }}/.datadog
8589
/github/workspace/.datadog
8690
${{ steps.go-cache-paths.outputs.GOPATH }}/bin/orchestrion

0 commit comments

Comments
 (0)