mirror of
https://github.com/ivuorinen/ivuorinen.git
synced 2026-03-18 17:03:03 +00:00
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
93 lines
2.7 KiB
YAML
93 lines
2.7 KiB
YAML
---
|
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
#################################
|
|
#################################
|
|
## Super Linter GitHub Actions ##
|
|
#################################
|
|
#################################
|
|
name: Lint Code Base
|
|
|
|
#
|
|
# Documentation:
|
|
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
|
|
#
|
|
|
|
env:
|
|
MAIN_BRANCH: main
|
|
|
|
#############################
|
|
# Start the job on all push #
|
|
#############################
|
|
on:
|
|
pull_request:
|
|
branches: [master, main]
|
|
workflow_call:
|
|
|
|
###############
|
|
# Set the Job #
|
|
###############
|
|
jobs:
|
|
build:
|
|
# Name the Job
|
|
name: Lint Code Base
|
|
# 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 #
|
|
##################
|
|
steps:
|
|
##########################
|
|
# Checkout the code base #
|
|
##########################
|
|
- name: Checkout Code
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
|
with:
|
|
# Full git history is needed to get a proper
|
|
# list of changed files within `super-linter`
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Node.js Environment
|
|
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
|
|
- name: Cache Node Modules
|
|
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
|
|
id: cache
|
|
with:
|
|
path: node_modules
|
|
key: node-modules-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
- name: Install npm packages
|
|
run: npm install
|
|
|
|
################################
|
|
# Run Linter against code base #
|
|
################################
|
|
- name: Lint Code Base
|
|
uses: super-linter/super-linter/slim@5119dcd8011e92182ce8219d9e9efc82f16fddb6 # v8
|
|
env:
|
|
VALIDATE_ALL_CODEBASE: false
|
|
LINTER_RULES_PATH: '${DEFAULT_WORKSPACE}'
|
|
VALIDATE_JSON: false # doesn't handle new config format
|
|
VALIDATE_NATURAL_LANGUAGE: false # doesn't seem to respect configs
|
|
FIX_ANSIBLE: true
|
|
FIX_ENV: true
|
|
FIX_JSON_PRETTIER: true
|
|
FIX_JSONC_PRETTIER: true
|
|
FIX_MARKDOWN: true
|
|
FIX_SHELL_SHFMT: true
|
|
FIX_TYPESCRIPT_PRETTIER: true
|
|
# Change to 'master' if your main branch differs
|
|
DEFAULT_BRANCH: ${{ env.MAIN_BRANCH }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|