mirror of
https://github.com/Haxxnet/Compose-Examples
synced 2024-11-28 06:21:14 +00:00
Create validator.yml
GitHub Action to validate docker-compoye.yml files
This commit is contained in:
parent
14fc21d0f3
commit
9091f38dea
26
.github/workflows/validator.yml
vendored
Normal file
26
.github/workflows/validator.yml
vendored
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
name: CI
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
validateComposeSyntax:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
#continue-on-error: true
|
||||||
|
steps:
|
||||||
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
# Loops over all compose files and uses docker compose check for YML validation
|
||||||
|
- name: DockerComposeCheck
|
||||||
|
run: |
|
||||||
|
for f in $(find ${PWD}/examples -name '*docker-compose*.yml'); \
|
||||||
|
do \
|
||||||
|
readlink -f $f && \
|
||||||
|
docker compose -f $(readlink -f $f) config; \
|
||||||
|
done
|
||||||
|
if: always()
|
Loading…
Reference in New Issue
Block a user