From d4451c8cda92859f5997be09529e5207af92b88e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 27 May 2023 17:51:36 +0900 Subject: [PATCH] Bump adrienverge/yamllint from 1.31.0 to 1.32.0 (#132) --- .github/FUNDING.yml | 4 +- .github/ISSUE_TEMPLATE/bug_report.md | 3 +- .github/ISSUE_TEMPLATE/feature_request.md | 3 +- .github/pull_request_template.md | 4 +- .github/workflows/functional-tests-local.yml | 4 +- .github/workflows/functional-tests-remote.yml | 6 +-- .github/workflows/pre-commit.yml | 40 +++++++++++++++++++ .../{create-release.yml => release.yml} | 8 ++-- .github/workflows/update-license.yml | 4 +- .pre-commit-config.yaml | 27 +++++++++---- .yamllint.yml | 2 + README.md | 7 +++- action.yml | 6 +-- 13 files changed, 87 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/pre-commit.yml rename .github/workflows/{create-release.yml => release.yml} (88%) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index d0534d2..08a9a71 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,6 +1,6 @@ --- -custom: ['https://en.cryptobadges.io/donate/145HwyQAcv4vrzUumJhu7nWGAVBysX9jJH'] -github: ['fabasoad'] +custom: ["https://en.cryptobadges.io/donate/145HwyQAcv4vrzUumJhu7nWGAVBysX9jJH"] +github: ["fabasoad"] issuehunt: fabasoad ko_fi: fabasoad liberapay: fabasoad diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 7fe9fbf..16cdd0b 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,10 +1,9 @@ --- name: Bug report about: Create a report to help us improve -title: '' +title: "" labels: bug assignees: fabasoad - --- #### Describe the bug diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 959f61e..5fb2426 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,10 +1,9 @@ --- name: Feature request about: Suggest an idea for this project -title: '' +title: "" labels: enhancement assignees: fabasoad - --- #### Is your feature request related to a problem? Please describe diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 3019107..5656993 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -5,7 +5,7 @@ Please check if your PR fulfills the following requirements: - [ ] I have read the [CONTRIBUTING](https://github.com/fabasoad/setup-cobol-action/blob/main/CONTRIBUTING.md) -doc. + doc. - [ ] Tests for the changes have been added (for bug fixes / features). - [ ] Docs have been reviewed and added / updated if needed (for bug fixes / features). @@ -27,10 +27,12 @@ Please check the type of change your PR introduces: - [ ] Other (please describe): ## What is the current behavior + ## What is the new behavior + - diff --git a/.github/workflows/functional-tests-local.yml b/.github/workflows/functional-tests-local.yml index 0a97b69..d554b90 100644 --- a/.github/workflows/functional-tests-local.yml +++ b/.github/workflows/functional-tests-local.yml @@ -1,7 +1,7 @@ --- name: Functional Tests (Local) -on: # yamllint disable-line rule:truthy +on: # yamllint disable-line rule:truthy pull_request: defaults: @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - version: ['3.1.2', '3.0-rc1', '3.1-rc1', '3.1.1'] + version: ["3.1.2", "3.0-rc1", "3.1-rc1", "3.1.1"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/functional-tests-remote.yml b/.github/workflows/functional-tests-remote.yml index 886025c..cd8a1b1 100644 --- a/.github/workflows/functional-tests-remote.yml +++ b/.github/workflows/functional-tests-remote.yml @@ -1,10 +1,10 @@ --- name: Functional Tests (Remote) -on: # yamllint disable-line rule:truthy +on: # yamllint disable-line rule:truthy push: branches: - - 'main' + - "main" defaults: run: @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - version: ['3.1.2', '3.0-rc1', '3.1-rc1', '3.1.1'] + version: ["3.1.2", "3.0-rc1", "3.1-rc1", "3.1.1"] runs-on: ubuntu-latest steps: - name: Setup COBOL diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..d50d018 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,40 @@ +--- +name: Pre-commit + +on: # yamllint disable-line rule:truthy + push: + branches: + - main + pull_request: + +defaults: + run: + shell: sh + +env: + SKIP: no-commit-to-branch + +jobs: + pre-commit: + runs-on: ubuntu-latest + container: + image: ghcr.io/fabasoad/pre-commit-container:latest + options: --user root + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Update git config + run: | + repo=$(echo "${{ github.repository }}" | cut -d "/" -f 2) + git config --global --add safe.directory "/__w/$repo/$repo" + - name: Run pre-commit on changed files + if: ${{ github.event_name == 'pull_request' }} + run: | + pre-commit run --to-ref ${{ github.sha }} --from-ref origin/${{ github.base_ref }} --hook-stage=commit + pre-commit run --to-ref ${{ github.sha }} --from-ref origin/${{ github.base_ref }} --hook-stage=push + - name: Run pre-commit on all files + if: ${{ github.event_name == 'push' && github.ref_name == 'main' }} + run: | + pre-commit run --hook-stage=commit --all-files + pre-commit run --hook-stage=push --all-files diff --git a/.github/workflows/create-release.yml b/.github/workflows/release.yml similarity index 88% rename from .github/workflows/create-release.yml rename to .github/workflows/release.yml index f63768f..6215133 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/release.yml @@ -1,14 +1,14 @@ --- -name: Create release +name: Release -on: # yamllint disable-line rule:truthy +on: # yamllint disable-line rule:truthy push: tags: - - 'v*.*.*' + - "v*.*.*" jobs: create-release: - name: Release + name: Create release runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/update-license.yml b/.github/workflows/update-license.yml index 39df8d0..9ab41be 100644 --- a/.github/workflows/update-license.yml +++ b/.github/workflows/update-license.yml @@ -1,9 +1,9 @@ --- name: Update license -on: # yamllint disable-line rule:truthy +on: # yamllint disable-line rule:truthy schedule: - - cron: '0 5 1 1 *' + - cron: "0 5 1 1 *" jobs: run: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dbc27f1..702509c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ --- default_install_hook_types: ["pre-commit", "pre-push"] -default_stages: ["commit"] +default_stages: ["commit", "push"] exclude: ^\.gitleaks\.toml$ minimum_pre_commit_version: 2.18.0 repos: @@ -9,17 +9,16 @@ repos: rev: v1.4.0 hooks: - id: detect-secrets - stages: ["commit", "push"] - repo: https://github.com/zricethezav/gitleaks rev: v8.16.3 hooks: - id: gitleaks - stages: ["commit", "push"] # Markdown - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.33.0 + rev: v0.34.0 hooks: - id: markdownlint-fix + stages: ["commit"] # Shell - repo: https://github.com/shellcheck-py/shellcheck-py rev: v0.9.0.2 @@ -28,21 +27,33 @@ repos: stages: ["push"] # Yaml - repo: https://github.com/adrienverge/yamllint - rev: v1.31.0 + rev: v1.32.0 hooks: - id: yamllint + stages: ["push"] + # GitHub Actions + - repo: https://github.com/rhysd/actionlint + rev: v1.6.24 + hooks: + - id: actionlint + args: ["-pyflakes="] + stages: ["push"] # Other + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v3.0.0-alpha.9-for-vscode + hooks: + - id: prettier + stages: ["commit"] - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks: - id: check-merge-conflict - id: check-json + stages: ["push"] - id: detect-private-key - stages: ["commit", "push"] - id: end-of-file-fixer - id: mixed-line-ending args: ["--fix=lf"] - id: no-commit-to-branch + stages: ["commit"] - id: trailing-whitespace -ci: - autofix_prs: false diff --git a/.yamllint.yml b/.yamllint.yml index 806149f..26886f9 100644 --- a/.yamllint.yml +++ b/.yamllint.yml @@ -2,6 +2,8 @@ extends: default rules: + comments: + min-spaces-from-content: 1 line-length: max: 185 level: error diff --git a/README.md b/README.md index 638fdaf..3bb0882 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,9 @@ [![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua) ![GitHub release](https://img.shields.io/github/v/release/fabasoad/setup-cobol-action?include_prereleases) -![Functional Tests](https://github.com/fabasoad/setup-cobol-action/workflows/Functional%20Tests%20(Remote)/badge.svg) -[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/fabasoad/setup-cobol-action/main.svg)](https://results.pre-commit.ci/latest/github/fabasoad/setup-cobol-action/main) +![functional-tests-local](https://github.com/fabasoad/setup-cobol-action/actions/workflows/functional-tests-local.yml/badge.svg) +![functional-tests-remote](https://github.com/fabasoad/setup-cobol-action/actions/workflows/functional-tests-remote.yml/badge.svg) +![pre-commit](https://github.com/fabasoad/setup-cobol-action/actions/workflows/pre-commit.yml/badge.svg) This action sets up a [GnuCOBOL](https://en.wikipedia.org/wiki/COBOL) programming language. @@ -12,9 +13,11 @@ Supported OS: Linux Ubuntu. ## Inputs + | Name | Required | Description | Default | Possible values | |---------|----------|-------------------|---------|----------------------------------------| | version | No | GnuCOBOL version. | `3.1.2` | `3.0-rc1`, `3.1-rc1`, `3.1.1`, `3.1.2` | + ## Example usage diff --git a/action.yml b/action.yml index 7475b06..4f8f052 100644 --- a/action.yml +++ b/action.yml @@ -7,11 +7,11 @@ branding: color: gray-dark inputs: version: - description: 'GnuCOBOL version.' + description: "GnuCOBOL version." required: false - default: '3.1.2' + default: "3.1.2" runs: - using: 'composite' + using: "composite" steps: - name: Fail uses: actions/github-script@v6