-
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.
- Loading branch information
root
authored and
root
committed
Sep 22, 2023
1 parent
4052c48
commit cf14b39
Showing
3 changed files
with
58 additions
and
58 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 |
---|---|---|
@@ -1,47 +1,17 @@ | ||
--- | ||
name: Reusable Workflow - Super Linter - Default | ||
name: Super Linter | ||
|
||
on: # https://docs.github.com/en/actions/using-workflows/reusing-workflows | ||
workflow_call: | ||
inputs: | ||
timezone: | ||
description: 'The timezone, defaults to `Asia/Shanghai`' | ||
type: string | ||
required: false | ||
default: 'Asia/Shanghai' | ||
runs-on: | ||
description: 'The jobs.<job_id>.runs-on, defaults to `["ubuntu-latest"]`' | ||
type: string | ||
required: false | ||
default: '["ubuntu-latest"]' | ||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow | ||
concurrency: | ||
group: ${{ github.workflow }}@${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
TZ: ${{ inputs.timezone }} | ||
on: | ||
push: | ||
branches: [master, main] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
linter-default: | ||
runs-on: ${{ fromJSON(inputs.runs-on) }} | ||
|
||
permissions: | ||
contents: read | ||
packages: read | ||
statuses: write | ||
|
||
steps: | ||
# https://github.com/marketplace/actions/checkout | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Full git history is needed to get a proper list of changed files within `super-linter` | ||
|
||
# https://github.com/marketplace/actions/super-linter | ||
- uses: super-linter/super-linter/slim@v5 | ||
name: 🔎🔎🔎 Run ${{ github.action }}: ${{ github.action_status }} | ||
env: | ||
SUPPRESS_POSSUM: true | ||
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | ||
GITHUB_TOKEN: ${{ github.token }} | ||
GITHUB_ACTIONS_COMMAND_ARGS: '-ignore colons -ignore line-length' # https://github.com/rhysd/actionlint/blob/main/docs/usage.md#super-linter | ||
HADOLINT_FAILURE_THRESHOLD: error # https://github.com/hadolint/hadolint#configure | ||
SHELLCHECK_OPTS: '--severity=warning' # https://github.com/koalaman/shellcheck#pre-commit | ||
VALIDATE_BASH_EXEC: false | ||
calling: | ||
uses: ./.github/workflows/linter-default.yml | ||
... |
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,47 @@ | ||
--- | ||
name: Reusable Workflow - Super Linter - Default | ||
|
||
on: # https://docs.github.com/en/actions/using-workflows/reusing-workflows | ||
workflow_call: | ||
inputs: | ||
timezone: | ||
description: 'The timezone, defaults to `Asia/Shanghai`' | ||
type: string | ||
required: false | ||
default: 'Asia/Shanghai' | ||
runs-on: | ||
description: 'The jobs.<job_id>.runs-on, defaults to `["ubuntu-latest"]`' | ||
type: string | ||
required: false | ||
default: '["ubuntu-latest"]' | ||
|
||
env: | ||
TZ: ${{ inputs.timezone }} | ||
|
||
jobs: | ||
linter-default: | ||
runs-on: ${{ fromJSON(inputs.runs-on) }} | ||
|
||
permissions: | ||
contents: read | ||
packages: read | ||
statuses: write | ||
|
||
steps: | ||
# https://github.com/marketplace/actions/checkout | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Full git history is needed to get a proper list of changed files within `super-linter` | ||
|
||
# https://github.com/marketplace/actions/super-linter | ||
- uses: super-linter/super-linter/slim@v5 | ||
name: 🔎🔎🔎 Run ${{ github.action }}: ${{ github.action_status }} | ||
env: | ||
SUPPRESS_POSSUM: true | ||
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | ||
GITHUB_TOKEN: ${{ github.token }} | ||
GITHUB_ACTIONS_COMMAND_ARGS: '-ignore colons -ignore line-length' # https://github.com/rhysd/actionlint/blob/main/docs/usage.md#super-linter | ||
HADOLINT_FAILURE_THRESHOLD: error # https://github.com/hadolint/hadolint#configure | ||
SHELLCHECK_OPTS: '--severity=warning' # https://github.com/koalaman/shellcheck#pre-commit | ||
VALIDATE_BASH_EXEC: false | ||
... |
This file was deleted.
Oops, something went wrong.