DockerCompose/.forgejo/workflows/lint.yaml

27 lines
642 B
YAML
Raw Normal View History

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:08:45 -04:00
container: catthehacker/ubuntu:act-latest
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 11:57:23 -04:00
- name: Install Linter
2023-10-21 12:09:12 -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 }}