Skip to content

test build files

test build files #10

Workflow file for this run

name: Build files and push
on:
repository_dispatch:
push:
branches: [ main ]
paths:
- 'template/README.jinja2'
- 'template/variables1.json'
- 'apps/*/variables.json'
- 'apps/*/docker-compose-*.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Get changed files
id: getfile
run: |
git diff --name-only HEAD^ HEAD
echo "VARIABLES_FILES=$(git diff --name-only HEAD^ HEAD -- 'apps/*/variables.json' | tr '\n' ',')" >> $GITHUB_ENV
echo "COMPOSE_FILES=$(git diff --name-only HEAD^ HEAD -- 'apps/*/docker-compose-*.yml' | tr '\n' ',')" >> $GITHUB_ENV
echo "VARIABLES_FILES: ${{ env.VARIABLES_FILES }}"
echo "COMPOSE_FILES: ${{ env.COMPOSE_FILES }}"
- name: Run variables_files.py
run: python3 build/variables_files.py "${{ env.VARIABLES_FILES }}"
- name: Run compose_files.py
run: python3 build/compose_files.py "${{ env.COMPOSE_FILES }}"
- name: Commit and push if changed
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Update files"
commit_options: "--no-verify --signoff"
push_options: "--force-with-lease"