{"id":17062881,"url":"https://github.com/bretfisher/super-linter-workflow","last_synced_at":"2025-04-09T17:25:22.185Z","repository":{"id":39582710,"uuid":"412138949","full_name":"BretFisher/super-linter-workflow","owner":"BretFisher","description":"A Reusable Workflow of the Super-Linter GitHub Action","archived":false,"fork":false,"pushed_at":"2025-02-26T17:23:32.000Z","size":118,"stargazers_count":43,"open_issues_count":1,"forks_count":33,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-02T11:53:46.931Z","etag":null,"topics":["ci-cd","github-actions","lint","linter","super-linter","workflow-reusable"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BretFisher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"bretfisher.com/members"}},"created_at":"2021-09-30T16:25:02.000Z","updated_at":"2025-03-02T03:14:11.000Z","dependencies_parsed_at":"2023-11-28T21:45:00.012Z","dependency_job_id":"ede0c174-35cc-4027-b94c-150b61b280a0","html_url":"https://github.com/BretFisher/super-linter-workflow","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BretFisher%2Fsuper-linter-workflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BretFisher%2Fsuper-linter-workflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BretFisher%2Fsuper-linter-workflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BretFisher%2Fsuper-linter-workflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BretFisher","download_url":"https://codeload.github.com/BretFisher/super-linter-workflow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248075876,"owners_count":21043660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci-cd","github-actions","lint","linter","super-linter","workflow-reusable"],"created_at":"2024-10-14T10:50:58.611Z","updated_at":"2025-04-09T17:25:22.169Z","avatar_url":"https://github.com/BretFisher.png","language":null,"funding_links":["bretfisher.com/members"],"categories":[],"sub_categories":[],"readme":"# Super Linter Reusable Workflow Examples\n\nThe 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).\n\n[My video walkthrough of this repository](https://youtu.be/aXZgQM8DqXg)\n\n## Features of this custom Super-Linter example\n\n- All the features of [Super-Linter](https://github.com/marketplace/actions/super-linter) in a *Reusable* Workflow.\n- 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).\n- Bonus: I added Job steps to correctly determine which branch to diff files with (in the case of having multiple release branches).\n- Bonus: Lints only changed files on a PR, but lints all files on merge to main (or any release) branch.\n\n\u003e ⚠️ **DO NOT call this reusable workflow directly**, rather, use it as a template repository and fork it for your own reusable workflow. I might change this workflow at anytime, based on new GHA features or learnings, and your calling workflow might break. ⚠️\n\n## How to reuse this example as a *Reusable* Workflow\n\n1. Fork this repository for you to customize your linters in a single location for your org/projects.\n2. Add a new workflow to all your other repositories and paste in this YAML to call the central-repos reusable workflow.\n\n```yaml\n---\n# template source: https://github.com/bretfisher/super-linter-workflow/blob/main/templates/call-super-linter.yaml\nname: Lint Code Base\n\non:\n\n  # run anytime a PR is merged to main or a direct push to main\n  push:\n    branches: [main]\n\n  # run on any push to a PR branch\n  pull_request:\n\n# cancel any previously-started, yet still active runs of this workflow on the same branch\nconcurrency:\n  group: ${{ github.ref }}-${{ github.workflow }}\n  cancel-in-progress: true\n\njobs:\n  call-super-linter:\n\n    name: Call Super-Linter\n\n    permissions:\n      contents: read # clone the repo to lint\n      statuses: write # read/write to repo custom statuses\n\n    ### use Reusable Workflows to call my workflow remotely\n    ### https://docs.github.com/en/actions/learn-github-actions/reusing-workflows\n    ### you can also call workflows from inside the same repo via file path\n\n    # FIXME: customize uri to point to your own reusable linter repository\n    uses: bretfisher/super-linter-workflow/.github/workflows/reusable-super-linter.yaml@main\n\n    ### Optional settings examples\n\n    # with:\n      ### For a DevOps-focused repository. Prevents some code-language linters from running\n      ### defaults to false\n      # devops-only: false\n\n      ### A regex to exclude files from linting\n      ### defaults to empty\n      # filter-regex-exclude: html/.*\n```\n\n## How to run Super-Linter locally\n\nOption 1: Use [nektos/act](https://github.com/nektos/act) to run an existing GitHub Action workflow on your local repository clone.\n\nOption 2: Use Docker to [run the Super-Linter image directly](https://github.com/github/super-linter/blob/main/docs/run-linter-locally.md).\n\nOption 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).\n\n## This repository is part of my example DevOps repos on GitHub Actions\n\n- [bretfisher/github-actions-templates](https://github.com/BretFisher/github-actions-templates) - Main repository\n- (you are here) [bretfisher/super-linter-workflow](https://github.com/BretFisher/super-linter-workflow) - Reusable linter workflow\n- [bretfisher/docker-build-workflow](https://github.com/BretFisher/docker-build-workflow)- Reusable docker build workflow\n- [bretfisher/docker-ci-automation](https://github.com/BretFisher/docker-ci-automation) - Step by step video and example of a Docker CI workflow\n- [My full list of container examples and tools](https://github.com/bretfisher)\n\n## 🎉🎉🎉 Join my cloud native DevOps community 🎉🎉🎉\n\n- [My Cloud Native DevOps Discord server](https://devops.fan)\n- [My weekly YouTube Live show](https://www.youtube.com/@BretFisher)\n- [My weekly newsletter](https://www.bretfisher.com/newsletter)\n- [My courses and coupons](https://www.bretfisher.com/courses)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbretfisher%2Fsuper-linter-workflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbretfisher%2Fsuper-linter-workflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbretfisher%2Fsuper-linter-workflow/lists"}