-
Notifications
You must be signed in to change notification settings - Fork 27
37 lines (30 loc) · 1.16 KB
/
build_files.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Build files and push
on:
repository_dispatch:
push:
branches: [ main ]
paths:
- 'apps/*/variables.json'
- 'apps/*/docker-compose-*.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get changed files
id: getfile
run: |
echo "::set-output name=variables_files::$(git diff --name-only -- 'apps/*/variables.json')"
echo "::set-output name=compose_files::$(git diff --name-only -- 'apps/*/docker-compose-*.yml')"
echo "variables_files: ${{ steps.getfile.outputs.variables_files }}"
echo "compose_files: ${{ steps.getfile.outputs.compose_files }}"
- name: Run variables_files.py
run: python3 build/variables_files.py "${{ steps.getfile.outputs.variables_files }}"
- name: Run compose_files.py
run: python3 build/compose_files.py "${{ steps.getfile.outputs.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"