forked from saltstack/salt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup
actionlint
and shellcheck
prior to running pre-commit
Signed-off-by: Pedro Algarvio <[email protected]>
- Loading branch information
Showing
4 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
name: setup-actionlint | ||
description: Setup actionlint | ||
inputs: | ||
version: | ||
description: The version of actionlint | ||
default: v1.6.23 | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
|
||
- name: Cache actionlint Binary | ||
uses: actions/cache@v3 | ||
with: | ||
path: /usr/local/bin/actionlint | ||
key: ${{ 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) | ||
mv ./actionlint /usr/local/bin/actionlint | ||
fi | ||
- name: Show actionlint Version | ||
shell: bash | ||
run: | | ||
actionlint --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
name: setup-shellcheck | ||
description: Setup shellcheck | ||
inputs: | ||
version: | ||
description: The version of shellcheck | ||
default: v0.9.0 | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
|
||
- name: Cache shellcheck Binary | ||
uses: actions/cache@v3 | ||
with: | ||
path: /usr/local/bin/shellcheck | ||
key: ${{ runner.os }}-${{ runner.arch }}-shellcheck-${{ inputs.version }} | ||
|
||
- name: Setup shellcheck | ||
shell: bash | ||
run: | | ||
if ! command -v shellcheck; then | ||
wget https://github.com/koalaman/shellcheck/releases/download/${{ inputs.version }}/shellcheck-${{ inputs.version }}.${{ runner.os }}.x86_64.tar.xz | ||
tar xf shellcheck-${{ inputs.version }}.${{ runner.os }}.x86_64.tar.xz | ||
mv shellcheck-${{ inputs.version }}/shellcheck /usr/local/bin/shellcheck | ||
rm -rf shellcheck-${{ inputs.version }}.${{ runner.os }}.x86_64.tar.xz shellcheck-${{ inputs.version }} | ||
fi | ||
- name: Show shellcheck Version | ||
shell: bash | ||
run: | | ||
shellcheck --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters