more tweaks
This commit is contained in:
6
.github/linters/.markdown-lint.yml
vendored
Normal file
6
.github/linters/.markdown-lint.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
# MD013/line-length - Line length
|
||||
MD013:
|
||||
# Number of characters, default is 80
|
||||
line_length: 9999
|
||||
# check code blocks?
|
||||
code_blocks: false
|
||||
24
.github/workflows/call-local-super-linter.yaml
vendored
Normal file
24
.github/workflows/call-local-super-linter.yaml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
# THIS IS NOT A TEMPLATE.
|
||||
# This is just for linting the gha-workflows repo itself.
|
||||
# We call the reusable workflow from its file path.
|
||||
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
call-super-linter:
|
||||
|
||||
name: Call Super-Linter
|
||||
|
||||
uses: ./.github/workflows/super-linter.yaml
|
||||
|
||||
permissions:
|
||||
contents: read # clone the repo to lint
|
||||
statuses: write #read/write to repo custom statuses
|
||||
13
README.md
13
README.md
@@ -8,16 +8,15 @@ The GitHub [Super-Linter](https://github.com/marketplace/actions/super-linter) p
|
||||
|
||||
## Features of this custom Super-Linter example
|
||||
|
||||
- All the features of [Super-Linter](https://github.com/marketplace/actions/super-linter) in a *Reusable* Workflow
|
||||
- Bonus: Optionally turn off non-DevOps linters (CSS, JS, HTML, etc.) when you want to ignore code (in my case it's to ignore sample code I stick in DevOps projects)
|
||||
- Bonus: I added Job steps to correctly determine which branch to diff files with (in the case of having multiple release branches)
|
||||
- Bonus: Lints only changed files on a PR, but lints all files on merge to main (or any release) branch
|
||||
- All the features of [Super-Linter](https://github.com/marketplace/actions/super-linter) in a *Reusable* Workflow.
|
||||
- Bonus: Optionally turn off non-DevOps linters (CSS, JS, HTML, etc.) when you want to ignore code (in my case it's to ignore sample code I stick in DevOps projects).
|
||||
- Bonus: I added Job steps to correctly determine which branch to diff files with (in the case of having multiple release branches).
|
||||
- Bonus: Lints only changed files on a PR, but lints all files on merge to main (or any release) branch.
|
||||
|
||||
## How to reuse this example as a *Reusable* Workflow
|
||||
|
||||
1. Fork this repository for you to customize your linters
|
||||
2. Add a workflow to all your other repositories that calls your linter workflow using GitHub's "Reusable Workflow"
|
||||
3. Add something similar to this to those workflows:
|
||||
1. Fork this repository for you to customize your linters in a single location for your org/projects.
|
||||
2. Add a new workflow to all your other repositories and paste in this YAML to call the central-repos reusable workflow.
|
||||
|
||||
```yaml
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user