-
Notifications
You must be signed in to change notification settings - Fork 1
98 lines (97 loc) · 3.16 KB
/
pr.yaml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Test
on:
push:
pull_request:
jobs:
build:
name: Build the image
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
mariadb:
image: mariadb:"10.10.2"
ports:
- 3306
env:
MYSQL_USER: trikorasolns_glpi
MYSQL_PASSWORD: trikorasolns_glpi
MYSQL_DATABASE: trikorasolns_glpi
MYSQL_ROOT_PASSWORD: trikorasolns_glpi
strategy:
matrix:
python-version: ["3.11"]
# mariadb-version: ["10.10.2"]
steps:
# Important: This sets up your GITHUB_WORKSPACE environment variable
- uses: actions/checkout@v3
with:
fetch-depth: 0 # needed for progressive mode to work
- name: Build core Image
id: build-core-image
uses: redhat-actions/buildah-build@v2
with:
image: trikorasolns_glpi_core
containerfiles: |
src/main/core/Dockerfile
- name: Build init Image
id: build-init-image
uses: redhat-actions/buildah-build@v2
with:
image: trikorasolns_glpi_init
containerfiles: |
src/main/init/Dockerfile
- name: Build web Image
uses: redhat-actions/buildah-build@v2
with:
image: trikorasolns_glpi_web
containerfiles: |
src/main/web/Dockerfile
- name: Build cron Image
uses: redhat-actions/buildah-build@v2
with:
image: trikorasolns_glpi_cron
containerfiles: |
src/main/cron/Dockerfile
- name: Add
run: |
cat > /etc/containers/registries.conf.d/localhost.conf <<EOF
[[registry]]
location = "localhost:5000"
insecure = true
EOF
cat /etc/containers/registries.conf.d/localhost.conf
- name: Push to local registry
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-init-image.outputs.image }}
tags: ${{ steps.build-init-image.outputs.tags }}
registry: localhost:5000/glpi-container
# # registry: localhost:5000/name/app:latest
# # username: quay-user
# # password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# pip install ruff pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# - name: Create k8s Kind Cluster
# uses: helm/[email protected]
# - uses: shogo82148/actions-setup-mysql@v1
# with:
# distribution: "mariadb"
# mysql-version: "${{ matrix.mariadb-version }}"
# user: trikorasolns_glpi
# password: trikorasolns_glpi
# - name: Run ansible-lint
# # replace `main` with any valid ref, or tags like `v6`
# uses: ansible/ansible-lint-action@main
# # optional:
# # with:
# # path: "playbooks/" # <-- only one value is allowed
# uses: dawidd6/action-ansible-playbook@v2