-
-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (41 loc) · 1.22 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
42
43
name: Build containers
on:
workflow_dispatch:
pull_request:
branches: [ master ]
push:
branches: [ master ]
schedule:
- cron: "0 1 * * *"
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
tag: ["7.4", "8.0", "8.1", "8.2"]
steps:
- name: Checkout the codebase
uses: actions/checkout@v4
- name: Build the container
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: Push the container to Docker Hub
env:
TAG: ${{ matrix.tag }}
if: github.repository_owner == 'eXistenZNL' && github.ref == 'refs/heads/master'
run: docker push existenz/builder:$(printenv TAG)