Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump pre-commit/pre-commit-hooks from 4.3.0 to 4.4.0 #72

Merged
merged 10 commits into from
Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from 9 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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @fabasoad
14 changes: 6 additions & 8 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,24 @@ jobs:
id: latest_release
run: |
latest_tag=$(curl --silent "https://api.github.com/repos/${{ github.repository }}/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
echo "::set-output name=tag::${latest_tag}"
echo "tag=${latest_tag}" >> $GITHUB_OUTPUT
- name: Get current release tag
id: current_release
run: echo "::set-output name=tag::${GITHUB_REF/refs\/tags\//}"
run: echo "tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: Build changelog
id: changelog
run: |
body=$(git log --pretty=oneline ${{ steps.latest_release.outputs.tag }}..${{ steps.current_release.outputs.tag }})
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo "::set-output name=body::${body}"
echo "body=${body}" >> $GITHUB_OUTPUT
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
release_name: ${{ steps.current_release.outputs.tag }}
name: ${{ steps.current_release.outputs.tag }}
token: ${{ secrets.GITHUB_TOKEN }}
body: |
# Changelog

Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,25 @@ on:
push:
branches:
- 'main'
- 'fix-*'
- 'feature-*'
pull_request:

jobs:
functional_tests:
name: Run script
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
version: ['0.1.dev0', '0.1.dev1']
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- uses: ./
with:
version: ${{ matrix.version }}
- name: Validate command (non-Windows)
if: ${{ matrix.os != 'windows-latest' }}
- name: Validate command (Linux, macOS)
if: ${{ runner.os != 'Windows' }}
run: |
touch ./hello-world.bf
echo "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.++" > ./hello-world.bf
Expand All @@ -36,7 +33,7 @@ jobs:
[[ "${output:32:12}" == "Hello World!" ]] || exit 1;
shell: bash
- name: Validate command (Windows)
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ runner.os == 'Windows' }}
run: |
New-Item -Path . -Name "hello-world.bf" -ItemType "file" -Value "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.++`n+.------.--------.>>+.>++."
$Output = (brainfucky --file ./hello-world.bf) | Out-String
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
.envrc
.idea
.vscode
4 changes: 4 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
---
default: true
MD013:
code_blocks: false
tables: false
MD041: false
5 changes: 2 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: detect-secrets
stages: ["commit", "push"]
- repo: https://github.com/zricethezav/gitleaks
rev: v8.15.0
rev: v8.15.1
hooks:
- id: gitleaks
stages: ["commit", "push"]
Expand All @@ -23,10 +23,9 @@ repos:
rev: v1.28.0
hooks:
- id: yamllint
args: ["-c", ".yamllint.yml"]
# Other
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: check-json
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@

This action installs one of the brainfuck interpreters called [brainfucky](https://pypi.org/project/brainfucky/).

## Prerequisites

The following tools have to be installed for successful work of this GitHub action:
[pip3](https://pip.pypa.io/en/stable/).

## Inputs

<!-- markdownlint-disable MD013 -->
| 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` |
<!-- markdownlint-enable MD013 -->

## Example usage

### Workflow configuration

<!-- markdownlint-disable MD013 -->
```yaml
name: Test

Expand All @@ -37,9 +39,9 @@ jobs:
echo "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.++" > ./hello-world.bf
echo "+.------.--------.>>+.>++." >> ./hello-world.bf
brainfucky --file ./hello-world.bf
rm ./hello-world.bf
rm -f ./hello-world.bf
shell: sh
```
<!-- markdownlint-enable MD013 -->

### Result

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ runs:
steps:
- name: Install Brainfuck
run: pip3 install brainfucky==${{ inputs.version }}
shell: bash
shell: sh