Build containers #1216
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build containers | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: [ master ] | |
push: | |
branches: [ master ] | |
schedule: | |
- cron: "0 1 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
tag: ["8.1", "8.2", "8.3", "8.4"] | |
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) |