2023-10-21 11:50:27 -04:00
|
|
|
name: Docker Compose Linter
|
2023-10-21 11:51:34 -04:00
|
|
|
on: [push]
|
2023-10-21 11:50:27 -04:00
|
|
|
jobs:
|
|
|
|
Docker Compose Linter:
|
|
|
|
runs-on: docker
|
2023-10-21 12:04:10 -04:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-10-21 12:06:24 -04:00
|
|
|
python-version: ["3.10"]
|
2023-10-21 11:50:27 -04:00
|
|
|
steps:
|
2023-10-21 11:54:30 -04:00
|
|
|
- name: Checkout Repository
|
|
|
|
uses: actions/checkout@v3
|
2023-10-21 11:50:27 -04:00
|
|
|
|
2023-10-21 12:02:16 -04:00
|
|
|
- name: Setup Python
|
2023-10-21 12:04:10 -04:00
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
2023-10-21 12:02:16 -04:00
|
|
|
|
2023-10-21 11:57:23 -04:00
|
|
|
- name: Install Linter
|
2023-10-21 12:02:16 -04:00
|
|
|
run: pip install yamllint
|
2023-10-21 11:57:23 -04:00
|
|
|
|
2023-10-21 11:54:30 -04:00
|
|
|
- name: Lint YAML
|
2023-10-21 12:01:26 -04:00
|
|
|
id: yaml-lint
|
2023-10-21 11:54:30 -04:00
|
|
|
uses: actions/yamllint@v3
|
2023-10-21 11:50:27 -04:00
|
|
|
|
2023-10-21 11:55:19 -04:00
|
|
|
- name: Save logs to file
|
2023-10-21 11:54:30 -04:00
|
|
|
run: echo ${{ steps.yaml-lint.outputs.logfile }}
|
2023-10-21 11:55:19 -04:00
|
|
|
|
|
|
|
- name: Upload logs
|
2023-10-21 11:54:30 -04:00
|
|
|
uses: actions/upload-artifact@v2
|
2023-10-21 11:50:27 -04:00
|
|
|
if: always()
|
|
|
|
with:
|
2023-10-21 11:54:30 -04:00
|
|
|
name: linter-logfile
|
2023-10-21 11:50:27 -04:00
|
|
|
path: ${{ steps.yaml-lint.outputs.logfile }}
|