trying input
This commit is contained in:
2
.github/dependabot.yml
vendored
2
.github/dependabot.yml
vendored
@@ -12,4 +12,4 @@ updates:
|
|||||||
- package-ecosystem: "github-actions"
|
- package-ecosystem: "github-actions"
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: "monthly"
|
interval: "weekly"
|
||||||
16
.github/workflows/super-linter.yaml
vendored
16
.github/workflows/super-linter.yaml
vendored
@@ -27,6 +27,11 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
# allow reuse of this workflow in other repos
|
# allow reuse of this workflow in other repos
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
devops-only:
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
@@ -86,6 +91,17 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo VALIDATE_ALL_CODEBASE=${{ !contains(github.event_name, 'pull_request') }}
|
echo VALIDATE_ALL_CODEBASE=${{ !contains(github.event_name, 'pull_request') }}
|
||||||
|
|
||||||
|
# disable non-DevOps focused linters that might run on sample code or 3rd party code
|
||||||
|
# these env's will get pass to the next step
|
||||||
|
- name: Disable non-DevOps linters
|
||||||
|
if: ${{ inputs.devops-only == true }}
|
||||||
|
run: |
|
||||||
|
echo "VALIDATE_CSS=false" >> $GITHUB_ENV
|
||||||
|
echo "VALIDATE_HTML=false" >> $GITHUB_ENV
|
||||||
|
echo "VALIDATE_JAVASCRIPT_ES=false" >> $GITHUB_ENV
|
||||||
|
echo "VALIDATE_JAVASCRIPT_STANDARD=false" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
|
||||||
#############################
|
#############################
|
||||||
# Run many Linters against changed files on PRs, and ALL files on commit to release branch
|
# Run many Linters against changed files on PRs, and ALL files on commit to release branch
|
||||||
#############################
|
#############################
|
||||||
|
|||||||
13
README.md
13
README.md
@@ -1,4 +1,4 @@
|
|||||||
# Super Linter Reusable Workflow Example
|
# 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/super-linter.yaml)
|
||||||
|
|
||||||
@@ -6,10 +6,11 @@ The GitHub [Super-Linter](https://github.com/marketplace/actions/super-linter) p
|
|||||||
|
|
||||||
[My video walkthrough of this repository](https://youtu.be/aXZgQM8DqXg)
|
[My video walkthrough of this repository](https://youtu.be/aXZgQM8DqXg)
|
||||||
|
|
||||||
## Features of this Super-Linter example
|
## Features of this custom Super-Linter example
|
||||||
|
|
||||||
- All the features of Super-Linter in a Workflow
|
- All the features of [Super-Linter](https://github.com/marketplace/actions/super-linter) in a *Reusable* Workflow
|
||||||
- Bonus: Added Job steps to correctly determine which branch to diff files with
|
- 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
|
- 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
|
## How to reuse this example as a *Reusable* Workflow
|
||||||
@@ -30,7 +31,9 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
call-super-linter:
|
call-super-linter:
|
||||||
#customize uri to point to your forked linter repository
|
# use Reusable Workflows to call my linter config remotely
|
||||||
|
# https://docs.github.com/en/actions/learn-github-actions/reusing-workflows
|
||||||
|
#FIXME: customize uri to point to your forked linter repository
|
||||||
uses: bretfisher/super-linter-workflow/.github/workflows/super-linter.yaml@main
|
uses: bretfisher/super-linter-workflow/.github/workflows/super-linter.yaml@main
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user