reorg (#15)
This commit is contained in:
@@ -17,7 +17,7 @@ jobs:
|
|||||||
|
|
||||||
name: Call Super-Linter
|
name: Call Super-Linter
|
||||||
|
|
||||||
uses: ./.github/workflows/super-linter.yaml
|
uses: ./.github/workflows/reusable-super-linter.yaml
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read # clone the repo to lint
|
contents: read # clone the repo to lint
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
# original template from: https://github.com/bretfisher/super-linter-workflow/blob/main/.github/workflows/super-linter.yaml
|
# original template from: https://github.com/bretfisher/super-linter-workflow/blob/main/.github/workflows/reusable-super-linter.yaml
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
###########################
|
###########################
|
||||||
38
README.md
38
README.md
@@ -1,17 +1,24 @@
|
|||||||
# Super Linter Reusable Workflow Examples
|
# Super Linter Reusable Workflow Examples
|
||||||
|
|
||||||
[](https://github.com/BretFisher/super-linter-workflow/actions/workflows/super-linter.yaml)
|
[](https://github.com/BretFisher/super-linter-workflow/actions/workflows/reusable-super-linter.yaml)
|
||||||
|
|
||||||
The GitHub [Super-Linter](https://github.com/marketplace/actions/super-linter) project is a fantastic way to lint all your file types with a single GitHub Actions Workflow. A great way to implement it everywhere is to use GHA's [Reusable Workflows](https://docs.github.com/en/actions/learn-github-actions/reusing-workflows) (see below).
|
The GitHub [Super-Linter](https://github.com/marketplace/actions/super-linter) project is a fantastic way to lint all your file types with a single GitHub Actions Workflow. A great way to implement it everywhere is to use GHA's [Reusable Workflows](https://docs.github.com/en/actions/learn-github-actions/reusing-workflows) (see below).
|
||||||
|
|
||||||
[My video walkthrough of this repository](https://youtu.be/aXZgQM8DqXg)
|
[My video walkthrough of this repository](https://youtu.be/aXZgQM8DqXg)
|
||||||
|
|
||||||
This repo is part of a group of my sample repos on GitHub Actions:
|
## This repository is part of my example repos on GitHub Actions
|
||||||
|
|
||||||
* [bretfisher/github-actions-templates](https://github.com/BretFisher/github-actions-templates) - Main repo
|
- (you are here) [bretfisher/github-actions-templates](https://github.com/BretFisher/github-actions-templates) - Main repository
|
||||||
* (you are here) [bretfisher/super-linter-workflow](https://github.com/BretFisher/super-linter-workflow) - Reusable linter workflow
|
- [bretfisher/super-linter-workflow](https://github.com/BretFisher/super-linter-workflow) - Reusable linter workflow
|
||||||
* [bretfisher/docker-build-workflow](https://github.com/BretFisher/docker-build-workflow)- Reusable docker build workflow
|
- [bretfisher/docker-build-workflow](https://github.com/BretFisher/docker-build-workflow)- Reusable docker build workflow
|
||||||
|
- [bretfisher/allhands22](https://github.com/BretFisher/github-actions-templates) - Step by step example of a Docker workflow
|
||||||
|
- [My full list of container examples and tools](https://github.com/bretfisher)
|
||||||
|
|
||||||
|
## 🎉🎉🎉 Join my container DevOps community 🎉🎉🎉
|
||||||
|
|
||||||
|
- [My "Vital DevOps" Discord server](https://devops.fan)
|
||||||
|
- [My weekly YouTube Live show](https://bret.live)
|
||||||
|
- [My courses and coupons](https://www.bretfisher.com/courses)
|
||||||
|
|
||||||
## Features of this custom Super-Linter example
|
## Features of this custom Super-Linter example
|
||||||
|
|
||||||
@@ -27,6 +34,7 @@ This repo is part of a group of my sample repos on GitHub Actions:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
---
|
---
|
||||||
|
# template source: https://github.com/bretfisher/super-linter-workflow/blob/main/templates/call-super-linter.yaml
|
||||||
name: Lint Code Base
|
name: Lint Code Base
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -40,23 +48,27 @@ jobs:
|
|||||||
call-super-linter:
|
call-super-linter:
|
||||||
|
|
||||||
name: Call Super-Linter
|
name: Call Super-Linter
|
||||||
|
|
||||||
# use Reusable Workflows to call my linter config remotely
|
|
||||||
# https://docs.github.com/en/actions/learn-github-actions/reusing-workflows
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read # clone the repo to lint
|
contents: read # clone the repo to lint
|
||||||
statuses: write #read/write to repo custom statuses
|
statuses: write #read/write to repo custom statuses
|
||||||
|
|
||||||
#FIXME: customize uri to point to your forked linter repository
|
### use Reusable Workflows to call my workflow remotely
|
||||||
uses: bretfisher/super-linter-workflow/.github/workflows/super-linter.yaml@main
|
### https://docs.github.com/en/actions/learn-github-actions/reusing-workflows
|
||||||
|
### you can also call workflows from inside the same repo via file path
|
||||||
|
|
||||||
|
#FIXME: customize uri to point to your own linter repository
|
||||||
|
uses: bretfisher/super-linter-workflow/.github/workflows/reusable-super-linter.yaml@main
|
||||||
|
|
||||||
# Optional settings examples
|
### Optional settings examples
|
||||||
|
|
||||||
# with:
|
# with:
|
||||||
|
### For a DevOps-focused repository. Prevents some code-language linters from running
|
||||||
|
### defaults to false
|
||||||
# devops-only: false
|
# devops-only: false
|
||||||
|
|
||||||
|
### A regex to exclude files from linting
|
||||||
|
### defaults to empty
|
||||||
# filter-regex-exclude: html/.*
|
# filter-regex-exclude: html/.*
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -65,3 +77,5 @@ jobs:
|
|||||||
Option 1: Use [nektos/act](https://github.com/nektos/act) to run an existing GitHub Action workflow on your local repository clone.
|
Option 1: Use [nektos/act](https://github.com/nektos/act) to run an existing GitHub Action workflow on your local repository clone.
|
||||||
|
|
||||||
Option 2: Use Docker to [run the Super-Linter image directly](https://github.com/github/super-linter/blob/main/docs/run-linter-locally.md).
|
Option 2: Use Docker to [run the Super-Linter image directly](https://github.com/github/super-linter/blob/main/docs/run-linter-locally.md).
|
||||||
|
|
||||||
|
Option 3: Pick the linter you want to run from Super-Linter, then install it locally to run manually. If you have a linter config, be sure to point the linter to `.github/linters/*`, and also realize that super-linter has default linter configs, that may change the linters behavior inside super-linter, with [templates listed here](https://github.com/github/super-linter/tree/main/TEMPLATES).
|
||||||
|
|||||||
37
templates/call-super-linter.yaml
Normal file
37
templates/call-super-linter.yaml
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
# template source: https://github.com/bretfisher/super-linter-workflow/blob/main/templates/call-super-linter.yaml
|
||||||
|
name: Lint Code Base
|
||||||
|
|
||||||
|
on:
|
||||||
|
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
call-super-linter:
|
||||||
|
|
||||||
|
name: Call Super-Linter
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read # clone the repo to lint
|
||||||
|
statuses: write #read/write to repo custom statuses
|
||||||
|
|
||||||
|
### use Reusable Workflows to call my workflow remotely
|
||||||
|
### https://docs.github.com/en/actions/learn-github-actions/reusing-workflows
|
||||||
|
### you can also call workflows from inside the same repo via file path
|
||||||
|
|
||||||
|
#FIXME: customize uri to point to your own forked super-linter repository
|
||||||
|
uses: bretfisher/super-linter-workflow/.github/workflows/reusable-super-linter.yaml@main
|
||||||
|
|
||||||
|
### Optional settings examples
|
||||||
|
|
||||||
|
# with:
|
||||||
|
### For a DevOps-focused repository. Prevents some code-language linters from running
|
||||||
|
### defaults to false
|
||||||
|
# devops-only: false
|
||||||
|
|
||||||
|
### A regex to exclude files from linting
|
||||||
|
### defaults to empty
|
||||||
|
# filter-regex-exclude: html/.*
|
||||||
Reference in New Issue
Block a user