From cf14b398432b4c5df5bcb93b50b6bc61488acef1 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 22 Sep 2023 22:59:07 +0800 Subject: [PATCH] update --- .github/workflows/liter-default.test.yml | 52 +++++------------------ .github/workflows/liter-default.yml | 47 ++++++++++++++++++++ .github/workflows/test:linter-default.yml | 17 -------- 3 files changed, 58 insertions(+), 58 deletions(-) create mode 100644 .github/workflows/liter-default.yml delete mode 100644 .github/workflows/test:linter-default.yml diff --git a/.github/workflows/liter-default.test.yml b/.github/workflows/liter-default.test.yml index 914817b..95c9000 100644 --- a/.github/workflows/liter-default.test.yml +++ b/.github/workflows/liter-default.test.yml @@ -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..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 ... \ No newline at end of file diff --git a/.github/workflows/liter-default.yml b/.github/workflows/liter-default.yml new file mode 100644 index 0000000..914817b --- /dev/null +++ b/.github/workflows/liter-default.yml @@ -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..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 +... \ No newline at end of file diff --git a/.github/workflows/test:linter-default.yml b/.github/workflows/test:linter-default.yml deleted file mode 100644 index 95c9000..0000000 --- a/.github/workflows/test:linter-default.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Super Linter - -# 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 - -on: - push: - branches: [master, main] - workflow_dispatch: - -jobs: - calling: - uses: ./.github/workflows/linter-default.yml -... \ No newline at end of file