Skip to content
name: Publish OpenDORA API Docker Image
on:
workflow_dispatch:
workflow_call:
release:
types: [published]
push:
tags:
- "*.*.*"
branches:
- main
jobs:
image:
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
run:
working-directory: devlake-go
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm64
steps:
- uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/devoteamnl/opendora/opendora-api
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Setup QEMU
id: qemu
uses: docker/setup-qemu-action@v3
with:
platforms: ${{ matrix.platform }}
- name: Setup Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
file: docker/devlake-go/Dockerfile
push: true
platforms: ${{ matrix.platforms }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}