feat: add validate to GitHub Action (#414)

This commit is contained in:
CorrectRoadH 2024-01-29 18:09:38 +08:00 committed by GitHub
parent 46f27409b5
commit 2454a873a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 34 additions and 0 deletions

34
.github/workflows/validator.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: validate docker compose file
on:
pull_request:
types: [opened, synchronize]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: robinraju/release-downloader@v1.9
with:
repository: "IceWhaleTech/CasaOS-AppManagement"
latest: true
fileName: "linux-amd64-casaos-app-management-validator-*.tar.gz"
- name: Extract
run: |
tar zxf linux-amd64-casaos-app-management-validator-*.tar.gz
- name: Install
run: |
chmod +x build/sysroot/usr/bin/casaos-app-management-validator
- name: Check All Docker Compose File
id: validate_docker_compose
run: |
find . -type f \( -name "docker-compose.yaml" -or -name "docker-compose.yml" \) | while read -r file; do
echo $file
build/sysroot/usr/bin/casaos-app-management-validator $file
done