From b5f22d65d602f873ab2fbed3620469c4d7db46f1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 23 May 2023 22:18:28 +0900 Subject: [PATCH] Bump adrienverge/yamllint from 1.31.0 to 1.32.0 (#76) --- .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.yml | 8 ++-- .github/workflows/pre-commit.yml | 40 +++++++++++++++++++ .../{create-release.yml => release.yml} | 10 ++--- .pre-commit-config.yaml | 27 +++++++++---- .yamllint.yml | 2 + README.md | 4 +- action.yml | 8 ++-- 11 files changed, 84 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/pre-commit.yml rename .github/workflows/{create-release.yml => release.yml} (85%) 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 08ea2c1..ecbef6d 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 c533285..c24c2a9 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 b1d0e19..c2bcbb5 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-brainfuck-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.yml b/.github/workflows/functional-tests.yml index bd8dc4c..dbc58e8 100644 --- a/.github/workflows/functional-tests.yml +++ b/.github/workflows/functional-tests.yml @@ -1,10 +1,10 @@ --- name: Functional Tests -on: +on: # yamllint disable-line rule:truthy push: branches: - - 'main' + - "main" pull_request: jobs: @@ -14,8 +14,8 @@ jobs: strategy: fail-fast: false matrix: - os: ['ubuntu', 'windows', 'macos'] - version: ['0.1.dev0', '0.1.dev1'] + os: ["ubuntu", "windows", "macos"] + version: ["0.1.dev0", "0.1.dev1"] runs-on: ${{ matrix.os }}-latest steps: - uses: actions/checkout@v3 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 85% rename from .github/workflows/create-release.yml rename to .github/workflows/release.yml index 89f8bf6..6215133 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/release.yml @@ -1,14 +1,14 @@ --- -name: Create release +name: Release -on: +on: # yamllint disable-line rule:truthy push: tags: - - 'v*.*.*' + - "v*.*.*" jobs: - create_release: - name: Release + create-release: + name: Create release runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8959ffe..dfd49ce 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,34 +9,45 @@ 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"] # 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 16c997a..55ea6c6 100644 --- a/.yamllint.yml +++ b/.yamllint.yml @@ -2,6 +2,8 @@ extends: default rules: + comments: + min-spaces-from-content: 1 line-length: max: 190 level: error diff --git a/README.md b/README.md index 53e7727..b493ca3 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua) ![Releases](https://img.shields.io/github/v/release/fabasoad/setup-brainfuck-action?include_prereleases) ![Functional Tests](https://github.com/fabasoad/setup-brainfuck-action/workflows/Functional%20Tests/badge.svg) -[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/fabasoad/setup-brainfuck-action/main.svg)](https://results.pre-commit.ci/latest/github/fabasoad/setup-brainfuck-action/main) +![pre-commit](https://github.com/fabasoad/setup-brainfuck-action/actions/workflows/pre-commit.yml/badge.svg) This action installs one of the brainfuck interpreters called [brainfucky](https://pypi.org/project/brainfucky/). @@ -14,9 +14,11 @@ The following tools have to be installed for successful work of this GitHub acti ## Inputs + | Name | Required | Description | Default | Possible values | |---------|----------|---------------------------------------------------------------------------------------------------|------------|------------------------| | version | No | Brainfucky library version that can be found [here](https://pypi.org/project/brainfucky/) version | `0.1.dev1` | `0.1.dev1`, `0.1.dev0` | + ## Example usage diff --git a/action.yml b/action.yml index a69a51b..dc0eb03 100644 --- a/action.yml +++ b/action.yml @@ -1,17 +1,17 @@ --- name: Setup Brainfuck author: Yevhen Fabizhevskyi -description: 'This GitHub action installs one of the brainfuck interpreters called brainfucky' +description: "This GitHub action installs one of the brainfuck interpreters called brainfucky" branding: icon: chevrons-right color: gray-dark inputs: version: - description: 'Brainfucky library version' + description: "Brainfucky library version" required: false - default: '0.1.dev1' + default: "0.1.dev1" runs: - using: 'composite' + using: "composite" steps: - name: Install Brainfuck run: pip3 install brainfucky==${{ inputs.version }}