From 5009424c9d44193271457af33e015bf459da7ada Mon Sep 17 00:00:00 2001 From: root Date: Fri, 22 Sep 2023 15:57:27 +0800 Subject: [PATCH] update --- .github/CODEOWNERS | 2 ++ .github/workflows/_test-linter-default.yml | 20 +++++++++++++ .github/workflows/linter-defaut.yml | 33 ++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/workflows/_test-linter-default.yml create mode 100644 .github/workflows/linter-defaut.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..337c912 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners +* @vbem \ No newline at end of file diff --git a/.github/workflows/_test-linter-default.yml b/.github/workflows/_test-linter-default.yml new file mode 100644 index 0000000..0400118 --- /dev/null +++ b/.github/workflows/_test-linter-default.yml @@ -0,0 +1,20 @@ +--- +name: Super Linter + +env: + TZ: Asia/Shanghai + +# 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: + linter: + use: ./.github/workflows/linter-default.yml +... \ No newline at end of file diff --git a/.github/workflows/linter-defaut.yml b/.github/workflows/linter-defaut.yml new file mode 100644 index 0000000..28ae4e2 --- /dev/null +++ b/.github/workflows/linter-defaut.yml @@ -0,0 +1,33 @@ +--- +name: Reusable workflow - Super Linter - Default + +on: # https://docs.github.com/en/actions/using-workflows/reusing-workflows + workflow_call: + +jobs: + linter: + runs-on: [ubuntu-latest] + + 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 Super-Linter + 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