Build containers #1482
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: | |
push: | |
schedule: | |
- cron: '0 1 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
tag: ["8.1", "8.2", "8.3"] | |
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) |