-
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.
Merge pull request #22 from mobilecoinofficial/linters
Add common linter helpers
- Loading branch information
Showing
5 changed files
with
113 additions
and
0 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,48 @@ | ||
name: Download Artifacts | ||
description: Wrapper for actions/download-artifact | ||
|
||
inputs: | ||
name: | ||
description: 'Name of the artifact to download. If unspecified, all artifacts for the run are downloaded.' | ||
required: false | ||
path: | ||
description: 'Destination path. Supports basic tilde expansion. Defaults to $GITHUB_WORKSPACE' | ||
required: false | ||
pattern: | ||
description: 'A glob pattern matching the artifacts that should be downloaded. Ignored if name is specified.' | ||
required: false | ||
merge-multiple: | ||
description: 'When multiple artifacts are matched, this changes the behavior of the destination directories. | ||
If true, the downloaded artifacts will be in the same directory specified by path. | ||
If false, the downloaded artifacts will be extracted into individual named directories within the specified path.' | ||
required: false | ||
default: 'false' | ||
github-token: | ||
description: 'The GitHub token used to authenticate with the GitHub API. | ||
This is required when downloading artifacts from a different repository or from a different workflow run. | ||
If this is not specified, the action will attempt to download artifacts from the current repository and the current workflow run.' | ||
required: false | ||
repository: | ||
description: 'The repository owner and the repository name joined together by "/". | ||
If github-token is specified, this is the repository that artifacts will be downloaded from.' | ||
required: false | ||
default: ${{ github.repository }} | ||
run-id: | ||
description: 'The id of the workflow run where the desired download artifact was uploaded from. | ||
If github-token is specified, this is the run that artifacts will be downloaded from.' | ||
required: false | ||
default: ${{ github.run_id }} | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ inputs.name }} | ||
path: ${{ inputs.path }} | ||
pattern: ${{ inputs.pattern }} | ||
merge-multiple: ${{ inputs.merge-multiple }} | ||
github-token: ${{ inputs.github-token }} | ||
repository: ${{ inputs.repository }} | ||
run-id: ${{ inputs.run-id }} |
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,14 @@ | ||
name: Lint GitHub Actions | ||
description: run actionlint with reviewdog | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout | ||
uses: mobilecoinofficial/gh-actions/checkout@v0 | ||
|
||
- name: Run actionlint with reviewdog | ||
uses: reviewdog/action-actionlint@v1 | ||
with: | ||
level: error | ||
reporter: github-pr-review |
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,22 @@ | ||
name: Lint Docker | ||
description: Lint dockerfiles with hadolint and reviewdog | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout | ||
uses: mobilecoinofficial/gh-actions/checkout@v0 | ||
|
||
- name: Install wget | ||
shell: bash | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y wget | ||
- name: Run hadolint with reviewdog | ||
uses: reviewdog/action-hadolint@v1 | ||
with: | ||
level: error | ||
reporter: github-pr-review | ||
exclude: | | ||
*.dockerignore |
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,15 @@ | ||
name: Lint Helm | ||
description: run helm lint | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout | ||
uses: mobilecoinofficial/gh-actions/checkout@v0 | ||
with: | ||
submodules: false | ||
|
||
- name: Lint Helm | ||
uses: mobilecoinofficial/gha-k8s-toolbox@v1 | ||
with: | ||
action: helm-lint |
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,14 @@ | ||
name: Lint Shell Scripts | ||
description: run shellcheck with reviewdog | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout | ||
uses: mobilecoinofficial/gh-actions/checkout@v0 | ||
|
||
- name: Run shellcheck with reviewdog | ||
uses: reviewdog/action-shellcheck@v1 | ||
with: | ||
level: error | ||
reporter: github-pr-review |