-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (58 loc) · 1.79 KB
/
build-auto.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
name: build-auto
on:
push:
branches:
- main
workflow_dispatch:
jobs:
changes:
runs-on: ubuntu-latest
outputs:
releases: ${{ steps.changes.outputs.changes }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create release filters
run: |
for release in $(ls -dl releases/** | grep "^d" | awk '{ print $9 }')
do
echo "$release: $release/**" >> .filters.yml
done
- name: Get changed releases
uses: dorny/paths-filter@v2
id: changes
with:
filters: .filters.yml
build:
runs-on: ubuntu-latest
timeout-minutes: 60
if: ${{ needs.changes.outputs.releases != '[]' }}
needs:
- changes
strategy:
fail-fast: false
matrix:
release: ${{ fromJson(needs.changes.outputs.releases) }}
steps:
- name: Checkout project
uses: actions/checkout@v3
- name: Authenticate with Quay.io
uses: docker/[email protected]
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
- name: Setup Python
uses: actions/setup-python@v4
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r ${{ matrix.release }}/requirements.txt
- name: Generate kolla config
run: |
python kolla-builder.py generate-config -i ${{ matrix.release }}/config.yml -o ${{ matrix.release }}/kolla-build.conf
- name: Build and push kolla images
run: |
kolla-build --version
kolla-build --config-file ${{ matrix.release }}/kolla-build.conf --template-override ${{ matrix.release }}/template-overrides.j2 --profile main --push