Skip to content

Build Docker images #72

Build Docker images

Build Docker images #72

name: Build Docker images
on:
workflow_dispatch:
workflow_call:
schedule:
- cron: '0 0 * * *'
jobs:
build:
name: "Build base image with Bookworm"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: 'bookworm'
fetch-depth: 100
- name: Determine latest version
id: latest_version
uses: flownative/action-git-latest-release@master
- run: |
sudo chmod -R ugo+rwX . && shopt -s dotglob && rm -rf *
- uses: actions/checkout@v3
with:
ref: ${{ steps.latest_version.outputs.tag }}
fetch-depth: 100
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
europe-docker.pkg.dev/flownative/docker/base
flownative/base
labels: |
org.opencontainers.image.title=Flownative Base Image
org.opencontainers.image.description=The base for most Docker images by Flownative
org.opencontainers.image.licenses=MIT
org.opencontainers.image.vendor=Flownative GmbH
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,bookworm
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_IO_REGISTRY_USER }}
password: ${{ secrets.DOCKER_IO_REGISTRY_PASSWORD }}
- name: Login to Google Artifacts Registry
uses: docker/login-action@v2
with:
registry: europe-docker.pkg.dev/flownative/docker
username: '_json_key'
password: ${{ secrets.GOOGLE_ARTIFACTS_PASSWORD_DOCKER }}
- name: Build Docker image
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Send mail for Opsgenie heartbeat
uses: dawidd6/action-send-mail@v3
with:
connection_url: ${{secrets.OPSGENIE_HEARTBEAT_MAIL_CREDENTIALS}}
subject: Github Actions heartbeat ping
to: [email protected]
from: Github Actions <[email protected]>
body: Build job of ${{github.repository}} completed successfully!