Skip to content

feat(terraform): configure mikrotik router #1364

feat(terraform): configure mikrotik router

feat(terraform): configure mikrotik router #1364

Workflow file for this run

---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Lint Job
on:
pull_request: {}
workflow_dispatch:
inputs:
run-all:
description: "Whether to run all linters or only the ones that have changes"
required: false
default: false
type: boolean
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
jobs:
paths-filter:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && !github.event.pull_request.draft)
outputs:
yaml: ${{ steps.filter.outputs.yaml }}
bash: ${{ steps.filter.outputs.bash }}
markdown: ${{ steps.filter.outputs.markdown }}
terraform: ${{ steps.filter.outputs.terraform }}
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Scan Paths
uses: dorny/[email protected]
id: filter
with:
filters: |
yaml:
- '**/*.yml'
- '**/*.yaml'
bash:
- '**/*.sh'
- '**/*.bash'
markdown:
- '**/*.md'
- '**/*.markdown'
terraform:
- '**/*.tf'
- '**/*.tfvars'
- name: Show Paths
run: |
echo "yaml=${{ steps.filter.outputs.yaml }}"
echo "bash=${{ steps.filter.outputs.bash }}"
echo "markdown=${{ steps.filter.outputs.markdown }}"
echo "terraform=${{ steps.filter.outputs.terraform }}"
yamllint:
runs-on: ubuntu-latest
needs: [paths-filter]
if: needs.paths-filter.outputs.yaml == 'true' || github.event.inputs.run-all == true
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Python
uses: actions/[email protected]
with:
python-version: "3.12"
- name: Install yamllint
run: pip install yamllint
- name: Run yamllint
run: yamllint -c .github/configs/yamllint.yaml .
shellcheck:
runs-on: ubuntu-latest
needs: [paths-filter]
if: needs.paths-filter.outputs.bash == 'true' || github.event.inputs.run-all == true
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install ShellCheck
run: sudo apt-get install -y shellcheck
- name: Run ShellCheck
run: find . -name "*.sh" -exec shellcheck {} +
markdownlint:
runs-on: ubuntu-latest
needs: [paths-filter]
if: needs.paths-filter.outputs.markdown == 'true' || github.event.inputs.run-all == true
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install Node.js
uses: actions/[email protected]
with:
node-version: "20"
- name: Install markdownlint-cli
run: npm install -g markdownlint-cli
- name: Run markdownlint
run: markdownlint '**/*.md'
tflint:
runs-on: ubuntu-latest
needs: [paths-filter]
if: needs.paths-filter.outputs.terraform == 'true' || github.event.inputs.run-all == true
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: terraform-linters/setup-tflint@v4
name: Setup TFLint
with:
tflint_version: v0.53.0
- name: Show TFLint version
run: tflint --version
- name: Init TFLint
run: tflint --init
- name: Run TFLint
run: tflint --format=compact --recursive