Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump actions/setup go and add a new input to activate the cache on demand #1

Merged
merged 1 commit into from
Jan 11, 2024
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
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