prometheus/.github/actions/setup_environment/action.yml
Julien Pivotto 8f3bcfac93
Move to github actions (#11235)
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2022-09-05 23:09:41 +02:00

34 lines
892 B
YAML

name: Setup environment
inputs:
enable_go:
type: boolean
description: Whether to enable go specific features, such as caching.
default: true
enable_npm:
type: boolean
description: Whether to enable npm specific features, such as caching.
default: true
runs:
using: composite
steps:
- uses: actions/cache@v3
if: ${{ inputs.enable_go }}
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/cache@v3
if: ${{ inputs.enable_npm }}
with:
path: |
~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('web/ui/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- run: make promu
shell: bash
if: ${{ inputs.enable_go }}