Build and push docker images #5
Workflow file for this run
This file contains hidden or 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 and push docker images | |
on: workflow_dispatch | |
jobs: | |
build-and-push: | |
strategy: | |
matrix: | |
ubuntu-version: [noble, jammy] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v5 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push fans-ci image | |
uses: docker/build-push-action@v6 | |
with: | |
context: ${{ github.workspace }} | |
file: docker/Dockerfile | |
platforms: | | |
linux/amd64 | |
linux/arm64 | |
push: true | |
tags: | | |
unistuttgartdae/fans-ci:${{ matrix.ubuntu-version }} | |
${{ matrix.ubuntu-version == 'noble' && format('unistuttgartdae/fans-ci:latest') || '' }} | |
target: fans_ci | |
build-args: UBUNTU_VERSION=${{ matrix.ubuntu-version }} | |
- name: Build and push fans-dev image | |
uses: docker/build-push-action@v6 | |
with: | |
context: ${{ github.workspace }} | |
file: docker/Dockerfile | |
platforms: | | |
linux/amd64 | |
linux/arm64 | |
push: true | |
tags: | | |
unistuttgartdae/fans-dev:${{ matrix.ubuntu-version }} | |
${{ matrix.ubuntu-version == 'noble' && format('unistuttgartdae/fans-dev:latest') || '' }} | |
target: fans_dev | |
build-args: UBUNTU_VERSION=${{ matrix.ubuntu-version }} |