mirror of
https://github.com/submariner-io/submariner-charts.git
synced 2026-09-20 20:20:35 +00:00
Per GitHub's security guidelines, GHAs should be pinned using full length commit SHAs instead of tags. The SHAs are of the commits currently resolved by the versions. Even "trusted" GHAs from GitHub developers are pinned because it's possible their repo rights could be compromised and a malicious GHA published. These core repos are not frequently substantially updated. Submariner-internal GHAs are left pinned at devel because we want automatic updates from Shipyard's shared tooling. Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
104 lines
3.2 KiB
YAML
104 lines
3.2 KiB
YAML
---
|
|
name: Linting
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
jobs:
|
|
apply-suggestions-commits:
|
|
name: 'No "Apply suggestions from code review" Commits'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Get PR commits
|
|
id: 'get-pr-commits'
|
|
uses: tim-actions/get-pr-commits@55b867b9b28954e6f5c1a0fe2f729dc926c306d0
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: 'Verify no "Apply suggestions from code review" commits'
|
|
uses: tim-actions/commit-message-checker-with-regex@d6d9770051dd6460679d1cab1dcaa8cffc5c2bbd
|
|
with:
|
|
commits: ${{ steps.get-pr-commits.outputs.commits }}
|
|
pattern: '^(?!.*(apply suggestions from code review))'
|
|
flags: 'i'
|
|
error: 'Commits addressing code review feedback should typically be squashed into the commits under review'
|
|
|
|
chart-testing:
|
|
name: Helm Chart Linting
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out the repository
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
|
|
|
- name: Set up Helm
|
|
uses: azure/setup-helm@18bc76811624f360dbd7f18c2d4ecb32c7b87bab
|
|
with:
|
|
version: v3.6.0
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@dc73133d4da04e56a135ae2246682783cc7c7cb6
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- name: Set up helm/chart-testing
|
|
uses: helm/chart-testing-action@5f16c27cf7a4fa9c776ff73734df3909b2b65127
|
|
|
|
- name: Run helm/chart-testing (lint)
|
|
run: ct lint --config ct.yaml
|
|
|
|
gitlint:
|
|
name: Commit Message(s)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out the repository
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Run gitlint
|
|
run: make gitlint
|
|
|
|
helm-docs:
|
|
name: Helm Docs Generation
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out the repository
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
|
|
|
- name: Run helm-docs and verify docs are up-to-date
|
|
run: make helm-docs
|
|
|
|
markdown-link-check:
|
|
name: Markdown Links (modified files)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out the repository
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
|
|
|
- name: Run markdown-link-check
|
|
uses: gaurav-nelson/github-action-markdown-link-check@9710f0fec812ce0a3b98bef4c9d842fc1f39d976
|
|
with:
|
|
config-file: ".markdownlinkcheck.json"
|
|
check-modified-files-only: "yes"
|
|
base-branch: ${{ github.base_ref }}
|
|
|
|
markdownlint:
|
|
name: Markdown
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out the repository
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
|
- name: Run markdownlint
|
|
run: make markdownlint
|
|
|
|
yaml-lint:
|
|
name: YAML
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out the repository
|
|
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
|
- name: Run yamllint
|
|
uses: ibiqlik/action-yamllint@665205c3255fcf157ef8dc9a40d527fe025a4bc8
|
|
with:
|
|
file_or_dir: submariner-k8s-broker/Chart.yaml submariner-k8s-broker/values.yaml submariner-operator/Chart.yaml submariner-operator/values.yaml
|
|
config_file: .yamllint.yml
|