mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Pass the cache seed
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
269b30eaad
commit
4dc1d2cd7f
3 changed files with 16 additions and 4 deletions
10
.github/actions/setup-actionlint/action.yml
vendored
10
.github/actions/setup-actionlint/action.yml
vendored
|
@ -4,7 +4,11 @@ description: Setup actionlint
|
|||
inputs:
|
||||
version:
|
||||
description: The version of actionlint
|
||||
default: v1.6.23
|
||||
default: 1.6.23
|
||||
cache-seed:
|
||||
required: true
|
||||
type: string
|
||||
description: Seed used to invalidate caches
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
|
@ -14,13 +18,13 @@ runs:
|
|||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /usr/local/bin/actionlint
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-actionlint-${{ inputs.version }}
|
||||
key: ${{ inputs.cache-seed }}|${{ runner.os }}|${{ runner.arch }}|actionlint|${{ inputs.version }}
|
||||
|
||||
- name: Setup actionlint
|
||||
shell: bash
|
||||
run: |
|
||||
if ! command -v actionlint; then
|
||||
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/${{ inputs.version }}/scripts/download-actionlint.bash)
|
||||
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) ${{ inputs.version }}
|
||||
mv ./actionlint /usr/local/bin/actionlint
|
||||
fi
|
||||
- name: Show actionlint Version
|
||||
|
|
6
.github/actions/setup-shellcheck/action.yml
vendored
6
.github/actions/setup-shellcheck/action.yml
vendored
|
@ -5,6 +5,10 @@ inputs:
|
|||
version:
|
||||
description: The version of shellcheck
|
||||
default: v0.9.0
|
||||
cache-seed:
|
||||
required: true
|
||||
type: string
|
||||
description: Seed used to invalidate caches
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
|
@ -14,7 +18,7 @@ runs:
|
|||
uses: actions/cache@v3
|
||||
with:
|
||||
path: /usr/local/bin/shellcheck
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-shellcheck-${{ inputs.version }}
|
||||
key: ${{ inputs.cache-seed }}|${{ runner.os }}|${{ runner.arch }}|shellcheck|${{ inputs.version }}
|
||||
|
||||
- name: Setup shellcheck
|
||||
shell: bash
|
||||
|
|
4
.github/workflows/pre-commit-action.yml
vendored
4
.github/workflows/pre-commit-action.yml
vendored
|
@ -37,7 +37,11 @@ jobs:
|
|||
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/setup-actionlint
|
||||
with:
|
||||
cache-seed: ${{ inputs.cache-seed }}
|
||||
- uses: ./.github/actions/setup-shellcheck
|
||||
with:
|
||||
cache-seed: ${{ inputs.cache-seed }}
|
||||
- uses: ./.github/actions/setup-pre-commit
|
||||
with:
|
||||
version: ${{ inputs.pre-commit-version }}
|
||||
|
|
Loading…
Add table
Reference in a new issue