super-linter workflow (rasa/scoop-directory)
The super-linter workflow from rasa/scoop-directory, explained and optimized by Latchkey.
C
CI health: C - fair
Point runs-on at Latchkey and get run de-duplication, job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the super-linter workflow from the rasa/scoop-directory repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
workflow (.yml)
# From https://github.com/github/super-linter/blob/main/TEMPLATES/linter.yml
# This workflow executes several linters on changed files based on languages used in your code base whenever
# you push a code or open a pull request.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/github/super-linter
name: super-linter
on:
push:
branches: [ $default-branch ]
pull_request:
branches: [ $default-branch ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
log_level:
description: 'LOG_LEVEL'
required: true
default: 'VERBOSE'
type: choice
options:
- TRACE
- DEBUG
- VERBOSE
- NOTICE
- WARN
- ERROR
jobs:
run-lint:
runs-on: ubuntu-latest
steps:
- name: Run actions/checkout@v4
uses: actions/checkout@v4
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
# default is 1 per https://github.com/actions/checkout#usage
fetch-depth: 0
- name: Run github/super-linter@v6
uses: github/super-linter@v6
env:
ACTIONS_RUNNER_DEBUG: true
DEFAULT_BRANCH: $default-branch
ERROR_ON_MISSING_EXEC_BIT: true
FILTER_REGEX_EXCLUDE: (by-.*\.md|vendor)
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IGNORE_GENERATED_FILES: true
LOG_LEVEL: ${{ github.event.inputs.log_level }}
# VALIDATE_ALL_CODEBASE: false
# VALIDATE_NATURAL_LANGUAGE: false
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
# From https://github.com/github/super-linter/blob/main/TEMPLATES/linter.yml # This workflow executes several linters on changed files based on languages used in your code base whenever # you push a code or open a pull request. # # You can adjust the behavior by modifying this file. # For more information, see: # https://github.com/github/super-linter name: super-linter on: push: branches: [ $default-branch ] pull_request: branches: [ $default-branch ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: inputs: log_level: description: 'LOG_LEVEL' required: true default: 'VERBOSE' type: choice options: - TRACE - DEBUG - VERBOSE - NOTICE - WARN - ERROR concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: run-lint: timeout-minutes: 30 runs-on: latchkey-small steps: - name: Run actions/checkout@v4 uses: actions/checkout@v4 with: # Full git history is needed to get a proper list of changed files within `super-linter` # default is 1 per https://github.com/actions/checkout#usage fetch-depth: 0 - name: Run github/super-linter@v6 uses: github/super-linter@v6 env: ACTIONS_RUNNER_DEBUG: true DEFAULT_BRANCH: $default-branch ERROR_ON_MISSING_EXEC_BIT: true FILTER_REGEX_EXCLUDE: (by-.*\.md|vendor) GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} IGNORE_GENERATED_FILES: true LOG_LEVEL: ${{ github.event.inputs.log_level }} # VALIDATE_ALL_CODEBASE: false # VALIDATE_NATURAL_LANGUAGE: false
What changed
- Run on Latchkey managed runners with one line (
runs-on), which apply the fixes below automatically and self-heal transient failures. This example useslatchkey-small; pick the runner size that fits the job. - Cancel superseded runs when a branch or PR gets a newer push.
- Add a job timeout so a hung step cannot burn hours of runner time.
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.