Skip to content

Commit

Permalink
ci: linter workflow (#33)
Browse files Browse the repository at this point in the history
* ci: linter workflow

* ci: more env in linter
  • Loading branch information
BearTS committed Nov 3, 2023
1 parent 50cfea9 commit 9ecc8a1
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
---
###########################
###########################
## Linter GitHub Actions ##
###########################
###########################
#################################
#################################
## Super Linter GitHub Actions ##
#################################
#################################
name: Lint Code Base

#
# Documentation:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
#

#############################
# Start the job on all push #
#############################
on:
push:
branches: [master]
# Remove the line above to run when pushing to master
branches-ignore: [master, main]
# Remove the line above to run when pushing to master or main
pull_request:
branches: [master]
branches: [master, main]

###############
# Set the Job #
Expand All @@ -31,6 +26,14 @@ jobs:
# Set the agent to run on
runs-on: ubuntu-latest

############################################
# Grant status permission for MULTI_STATUS #
############################################
permissions:
contents: read
packages: read
statuses: write

##################
# Load all steps #
##################
Expand All @@ -39,25 +42,25 @@ jobs:
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
# Full git history is needed to get a proper
# list of changed files within `super-linter`
fetch-depth: 0

################################
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter@v4.9.0
uses: super-linter/super-linter@v5
env:
VALIDATE_ALL_CODEBASE: true
VALIDATE_MARKDOWN: false
DEFAULT_BRANCH: master
VALIDATE_DOCKERFILE: false
VALIDATE_DOCKERFILE: true
VALIDATE_DOCKERFILE_HADOLINT: false
VALIDATE_PYTHON_FLAKE8: false
VALIDATE_BASH: false
VALIDATE_JSCPD: false
VALIDATE_RUST_2015: false

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 9ecc8a1

Please sign in to comment.