diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index bf4a10e..da07e47 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -90,7 +90,7 @@ body: id: terms attributes: label: 📜 Code of Conduct - description: By submitting this issue, you agree to follow [`Code of Conduct`](https://github.com/raven-actions/actionlint/blob/main/.github/CODE_OF_CONDUCT.md) + description: By submitting this issue, you agree to follow [`Code of Conduct`](../blob/main/.github/CODE_OF_CONDUCT.md) options: - label: I agree to follow this project's Code of Conduct. required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index fd4eae4..1867df6 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,3 +1,4 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-issue-config.json # https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#configuring-the-template-chooser --- blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml index 1f0ff4f..574c266 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -44,7 +44,7 @@ body: id: terms attributes: label: 📜 Code of Conduct - description: By submitting this issue, you agree to follow [`Code of Conduct`](https://github.com/raven-actions/actionlint/blob/main/.github/CODE_OF_CONDUCT.md) + description: By submitting this issue, you agree to follow [`Code of Conduct`](../blob/main/.github/CODE_OF_CONDUCT.md) options: - label: I agree to follow this project's Code of Conduct. required: true diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml index 776809c..4c0c0ff 100644 --- a/.github/ISSUE_TEMPLATE/question.yml +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -38,7 +38,7 @@ body: id: terms attributes: label: 📜 Code of Conduct - description: By submitting this issue, you agree to follow [`Code of Conduct`](https://github.com/raven-actions/actionlint/blob/main/.github/CODE_OF_CONDUCT.md) + description: By submitting this issue, you agree to follow [`Code of Conduct`](../blob/main/.github/CODE_OF_CONDUCT.md) options: - label: I agree to follow this project's Code of Conduct. required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9ec147b..14942c6 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -11,7 +11,7 @@ Fixes: # -- [ ] 📚 Examples / docs / tutorials +- [ ] 📚 Examples/docs/tutorials - [ ] 🐛 Bug fix (non-breaking change which fixes an issue) - [ ] 🥂 Improvement (non-breaking change which improves an existing feature) - [ ] 🚀 New feature (non-breaking change which adds functionality) @@ -23,5 +23,5 @@ Fixes: # -- [ ] I've read the [`Code of Conduct`](https://github.com/raven-actions/actionlint/blob/main/.github/CODE_OF_CONDUCT.md)> document. +- [ ] I've read the [`Code of Conduct`](https://github.com/raven-actions/actionlint/blob/main/.github/CODE_OF_CONDUCT.md) document. - [ ] I've read the [`Contributing`](https://github.com/raven-actions/actionlint/blob/main/.github/CONTRIBUTING.md) guide. diff --git a/.github/SECURITY.md b/.github/SECURITY.md index 9ed7525..75f8296 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -3,8 +3,8 @@ ## 🎯 Supported Versions | Version | Supported | -|:-------:|:---------:| -| 1.x.x | ✅ | +| :-----: | :-------: | +| 1.x.x | ✅ | ## 🚨 Reporting a Vulnerability diff --git a/.github/release-drafter.yml b/.github/configs/release-drafter.yml similarity index 100% rename from .github/release-drafter.yml rename to .github/configs/release-drafter.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 24353d4..decd17a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,7 @@ +# yaml-language-server: $schema=https://json.schemastore.org/dependabot-2.0.json # Please see the documentation for all configuration options: -# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - +# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file +--- version: 2 updates: # https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot @@ -10,7 +11,7 @@ updates: schedule: interval: daily commit-message: - prefix: "⬆️ github-actions" + prefix: ci include: scope labels: - dependencies diff --git a/.github/linters/.yamllint.yml b/.github/linters/.yamllint.yml new file mode 100644 index 0000000..56ac316 --- /dev/null +++ b/.github/linters/.yamllint.yml @@ -0,0 +1,10 @@ +# yaml-language-server: $schema=https://json.schemastore.org/yamllint.json +# https://yamllint.readthedocs.io/en/stable/configuration.html#extending-the-default-configuration +--- +extends: default + +locale: en_US.UTF-8 + +rules: + line-length: disable + comments: disable diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9b99b2..f1cadaf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ --- name: CI -on: +on: # yamllint disable-line rule:truthy pull_request: branches: - main diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 503508b..e1c5644 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -1,7 +1,7 @@ --- name: Linter -on: +on: # yamllint disable-line rule:truthy pull_request: branches: - main diff --git a/.github/workflows/release-draft.yml b/.github/workflows/release-draft.yml index 49b4179..9de738c 100644 --- a/.github/workflows/release-draft.yml +++ b/.github/workflows/release-draft.yml @@ -1,7 +1,7 @@ --- name: Draft Release -on: +on: # yamllint disable-line rule:truthy push: branches: - main diff --git a/.github/workflows/release-publish.yml b/.github/workflows/release-publish.yml index 3806648..31e0675 100644 --- a/.github/workflows/release-publish.yml +++ b/.github/workflows/release-publish.yml @@ -1,8 +1,7 @@ --- name: Publish Release -on: - # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release +on: # yamllint disable-line rule:truthy release: types: - published diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 197ffb4..30df3b0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,17 +1,18 @@ +--- default_install_hook_types: - pre-commit repos: - - repo: local - hooks: - - id: pre-commit-autoupdate - name: Run pre-commit autoupdate - entry: pre-commit autoupdate - language: system - pass_filenames: false - # files: .pre-commit-config.yaml + # - repo: local + # hooks: + # - id: pre-commit-autoupdate + # name: Run pre-commit autoupdate + # entry: pre-commit autoupdate + # language: system + # pass_filenames: false + # files: .pre-commit-config.yaml - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-symlinks - id: trailing-whitespace @@ -39,14 +40,9 @@ repos: exclude: package-lock.json - repo: https://github.com/gitleaks/gitleaks - rev: v8.16.3 + rev: v8.18.0 hooks: - id: gitleaks args: - --config - ".github/linters/.gitleaks.toml" - - # - repo: https://github.com/rhysd/actionlint - # rev: v1.6.24 - # hooks: - # - id: actionlint diff --git a/.vscode/settings.json b/.vscode/settings.json index 0c341a2..0bbdd5b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,15 +4,12 @@ "git.autofetch": true, "git.fetchOnPull": true, "git.pruneOnFetch": true, - "git.branchProtection": [ - "main", - "master", - ], + "git.branchProtection": ["main", "master"], // files "files.trimTrailingWhitespace": true, "files.insertFinalNewline": true, "files.associations": { - "CODEOWNERS": "ignore", + "CODEOWNERS": "ignore" }, // editor "editor.formatOnSave": true, @@ -26,5 +23,11 @@ "markdown.extension.toc.updateOnSave": true, "markdown.extension.orderedList.marker": "one", "markdown.extension.print.absoluteImgPath": true, - "markdown.extension.toc.slugifyMode": "github" + "markdown.extension.toc.slugifyMode": "github", + "yaml.format.singleQuote": false, + "linter.linters": { + "yamllint": { + "configFiles": [".github/linters/.yamllint.yml"] + } + } } diff --git a/.yamllint b/.yamllint deleted file mode 100644 index 785f308..0000000 --- a/.yamllint +++ /dev/null @@ -1,3 +0,0 @@ -rules: - line-length: - disable: true diff --git a/README.md b/README.md index e2780d6..fe80b0b 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ Action returns some basic information. For more details, follow [📤 Outputs](# ## 📥 Inputs | Name | Required | Type | Default value | Description | -|:---------------:|:--------:|:--------:|:-------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------| +| :-------------: | :------: | :------: | :-----------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------- | | `version` | false | `string` | `latest` | SemVer version of `actionlint`, recommended to keep default: latest | | `matcher` | false | `bool` | `true` | Use matcher for GitHub annotations | | `files` | false | `string` | *not set* | To lint different workflow files (default searching directory is `.github/workflows`), use comma-separated glob patterns, e.g., `tests/*.yml, tests/*.yaml` | @@ -83,7 +83,7 @@ Action returns some basic information. For more details, follow [📤 Outputs](# ## 📤 Outputs | Name | Type | Description | -|:----------------:|:--------:|:-------------------------------------------------------------------------------------------------------------------------------| +| :--------------: | :------: | :----------------------------------------------------------------------------------------------------------------------------- | | `version-semver` | `string` | SemVer version of `actionlint`, recommended to keep default: latest | | `version-tag` | `string` | Use matcher for GitHub annotations | | `exit-code` | `int` | Exit status code based on [actionlint exit status](https://github.com/rhysd/actionlint/blob/main/docs/usage.md#exit-status) | diff --git a/tests/fixtures/test.broken.yaml b/tests/fixtures/test.broken.yaml index e9b5a66..2fd9f94 100644 --- a/tests/fixtures/test.broken.yaml +++ b/tests/fixtures/test.broken.yaml @@ -1,4 +1,5 @@ -on: +--- +on: # yamllint disable-line rule:truthy push: branch: test-only/foo-bar tags: diff --git a/tests/fixtures/test.broken.yml b/tests/fixtures/test.broken.yml index e9b5a66..2fd9f94 100644 --- a/tests/fixtures/test.broken.yml +++ b/tests/fixtures/test.broken.yml @@ -1,4 +1,5 @@ -on: +--- +on: # yamllint disable-line rule:truthy push: branch: test-only/foo-bar tags: