Skip to content

Commit

Permalink
Update workflows, add pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nosborn committed Jun 22, 2021
1 parent a93e9da commit dd3e360
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 12 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/local-test.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
- uses: actions/[email protected]
- uses: pre-commit/[email protected]

local-test:
needs: pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
- name: Create Release
id: create_release
uses: actions/create-release@v1
- uses: actions/[email protected]
- uses: actions/create-release@v1
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
Expand Down
29 changes: 29 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit dd3e360

Please sign in to comment.