Skip to content

Commit

Permalink
bump actions/setup go and add a new input to activate the cache on de…
Browse files Browse the repository at this point in the history
…mand

Signed-off-by: Augustin Husson <[email protected]>
  • Loading branch information
Nexucis committed Jan 11, 2024
1 parent bb036c6 commit 3dfb5bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: An action used by the Perses project to share github actions.
runs:
using: composite
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: 'perses/github-actions'
path: '.github/perses-ci'
13 changes: 5 additions & 8 deletions actions/setup_environment/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,21 @@ inputs:
enable_go:
description: Whether to enable go specific features, such as caching.
default: "false"
enable_go_cache:
description: Wether you want to cache the go dependencies
default: "true"
enable_npm:
description: Whether to enable npm specific features, such as caching.
default: "false"
runs:
using: composite
steps:
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
if: inputs.enable_go == 'true'
with:
go-version: 1.21.x
- uses: actions/[email protected]
if: inputs.enable_go == 'true'
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
cache: ${{ inputs.enable_go_cache }}
- name: Install nodejs
uses: actions/setup-node@v3
if: inputs.enable_npm == 'true'
Expand Down

0 comments on commit 3dfb5bc

Please sign in to comment.