-
-
Notifications
You must be signed in to change notification settings - Fork 32
41 lines (39 loc) · 1.21 KB
/
build-containers.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
name: Build containers
on:
workflow_dispatch:
pull_request:
push:
schedule:
- cron: '0 1 * * *'
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
tag: ["8.1", "8.2", "8.3", "8.4-edge"]
steps:
- name: Checkout the codebase
uses: actions/checkout@v4
- name: Build the container for testing
run: make build TAG=$(printenv TAG)
env:
TAG: ${{ matrix.tag }}
- name: Start the container
run: make start TAG=$(printenv TAG) && sleep 10
env:
TAG: ${{ matrix.tag }}
- name: Test the container
run: make test TAG=$(printenv TAG)
env:
TAG: ${{ matrix.tag }}
- name: Login to Docker Hub
if: github.repository_owner == 'eXistenZNL' && github.ref == 'refs/heads/master'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build multi-arch and push the container to Docker Hub
env:
TAG: ${{ matrix.tag }}
if: github.repository_owner == 'eXistenZNL' && github.ref == 'refs/heads/master'
run: make buildx-and-push TAG=$(printenv TAG)