Skip to content

kodbox

kodbox #570

Workflow file for this run

name: Auto test apps
on:
push:
branches: [main]
paths:
- "apps/*/.env"
- "apps/*/docker-compose.yml"
jobs:
test:
name: Test docker compose
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Get applist
id: getlist
run: |
git diff --name-only HEAD^ HEAD
changed_files=$(git diff --name-only HEAD^ HEAD)
app_list=$(echo "$changed_files" | grep -E 'apps/.*/(.env|docker-compose.yml)$' | awk -F'/' '{print $2}' | sort | uniq)
echo "APP_LISTS=$app_list" >> $GITHUB_ENV
- name: Update readme when app's variables.json changed
run: |
docker network create websoft9
pip install python-dotenv
python3 build/test_apps.py "${{ env.APP_LISTS }}"
if: env.APP_LISTS != ''