This makes standard use of shellcheck work without needing to provide extra configuration anywhere. Also remove use of inline 'shellcheck disable' calls that are already defined in the .shellcheckrc and don't need to be set inline.
97 lines
2.6 KiB
YAML
97 lines
2.6 KiB
YAML
---
|
|
name: 'lint'
|
|
|
|
# yamllint disable-line rule:truthy
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- '*'
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
|
|
jobs:
|
|
hadolint:
|
|
name: hadolint
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Clone
|
|
uses: actions/checkout@v3
|
|
- name: Run hadolint
|
|
uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf
|
|
# v3.0.0 => 4b5806eb9c6bee4954fc0e0cc3ad6175fc9782c1
|
|
|
|
markdown-lint:
|
|
name: markdown-lint
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Clone
|
|
uses: actions/checkout@v3
|
|
- name: Run markdown-lint
|
|
uses: avto-dev/markdown-lint@04d43ee9191307b50935a753da3b775ab695eceb
|
|
# v1.5.0 => 04d43ee9191307b50935a753da3b775ab695eceb
|
|
with:
|
|
config: '.github/linters/.markdown-lint.yml'
|
|
args: './README.md'
|
|
|
|
packer:
|
|
name: packer
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
- name: Setup packer
|
|
uses: hashicorp/setup-packer@main
|
|
with:
|
|
version: latest
|
|
- name: Run packer init
|
|
run: "make image/init/digitalocean"
|
|
env:
|
|
PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Get changed files in the docs folder
|
|
id: changed-files-specific
|
|
uses: tj-actions/changed-files@v37.5.2
|
|
with:
|
|
files: contrib/images/digitalocean/**
|
|
- name: Run `packer validate`
|
|
env:
|
|
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
|
|
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
|
run: "make image/validate/digitalocean"
|
|
|
|
shellcheck:
|
|
name: shellcheck
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Clone
|
|
uses: actions/checkout@v3
|
|
- name: Run shellcheck
|
|
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38
|
|
# 1.1.0 => 94e0aab03ca135d11a35e5bfc14e6746dc56e7e9
|
|
|
|
shfmt:
|
|
name: shfmt
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Clone
|
|
uses: actions/checkout@v3
|
|
- name: Run shfmt
|
|
uses: luizm/action-sh-checker@76ab0b22e1f194e4a582edc7969df6485c4e9246
|
|
# v0.5.0 => edd0e45ecff35b05f162052b50df50976c1b74fc
|
|
env:
|
|
SHFMT_OPTS: -l -bn -ci -i 2 -d
|
|
with:
|
|
sh_checker_shellcheck_disable: true
|
|
|
|
yamllint:
|
|
name: yamllint
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Clone
|
|
uses: actions/checkout@v3
|
|
- name: Run yamllint
|
|
uses: ibiqlik/action-yamllint@2576378a8e339169678f9939646ee3ee325e845c
|
|
# v3.1.1 => 2576378a8e339169678f9939646ee3ee325e845c
|
|
with:
|
|
config_file: '.github/linters/.yamllint.yml'
|