diff --git a/.github/workflows/local-test.yml b/.github/workflows/ci.yml similarity index 53% rename from .github/workflows/local-test.yml rename to .github/workflows/ci.yml index f42ba08..20aae21 100644 --- a/.github/workflows/local-test.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,28 @@ --- +name: CI + on: # yamllint disable-line rule:truthy pull_request: + branches: + - master push: + branches: + - master -name: local-test +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true jobs: - test: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.4 + - uses: actions/setup-python@v2.2.2 + - uses: pre-commit/action@v2.0.3 + + local-test: + needs: pre-commit runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1eaf73e..465b9b0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,21 +1,19 @@ --- +name: Release + on: # yamllint disable-line rule:truthy push: tags: - - "v*" + - v* -name: Create Release +concurrency: ci-release jobs: - build: - name: Create Release + create-release: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v2.3.4 - - name: Create Release - id: create_release - uses: actions/create-release@v1 + - uses: actions/checkout@v2.3.4 + - uses: actions/create-release@v1 with: tag_name: ${{ github.ref }} release_name: ${{ github.ref }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..a4b1a6a --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,29 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +--- +minimum_pre_commit_version: !!str 2.13 + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.0.1 + hooks: + - id: check-added-large-files + - id: check-case-conflict + - id: check-executables-have-shebangs + - id: check-merge-conflict + - id: check-symlinks + - id: check-vcs-permalinks + - id: check-yaml + - id: destroyed-symlinks + - id: end-of-file-fixer + exclude: examples/ignore/example-ignore.md + - id: fix-byte-order-marker + - id: forbid-new-submodules + - id: mixed-line-ending + - id: trailing-whitespace + exclude: examples/ignore/example-ignore.md + + - repo: https://github.com/zricethezav/gitleaks + rev: v7.5.0 + hooks: + - id: gitleaks diff --git a/README.md b/README.md index e0203ed..ef54072 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ -# github-action-markdownlint-cli +# github-action-markdown-cli A GitHub Action that performs style checking and linting for Markdown/CommonMark files using [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli). +[![CI Workflow Status](https://github.com/nosborn/github-action-markdown-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/nosborn/github-action-markdown-cli/actions/workflows/ci.yml) +[![Release Workflow Status](https://github.com/nosborn/github-action-markdown-cli/actions/workflows/release.yml/badge.svg)](https://github.com/nosborn/github-action-markdown-cli/actions/workflows/release.yml) + ## Usage Basic usage with all options enabled: