Skip to content

ci: build migrate image #4

ci: build migrate image

ci: build migrate image #4

Workflow file for this run

name: Build and Release
on:
workflow_dispatch:
push:
branches: [main]
tags: ['*']
jobs:
build-and-release:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
strategy:
matrix:
include:
- dockerfile: ./Dockerfile
image: ${{github.event.repository.name}}
- dockerfile: ./docker/migrate/Dockerfile
image: ${{github.event.repository.name}}-migrate
steps:
- uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.repository_owner}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/${{github.repository_owner}}/${{matrix.image}}
tags: |
type=ref,event=branch
type=ref,event=tag
type=raw,value=latest,enable={{is_default_branch}}
type=sha,format=short,prefix=
- name: Build and push Docker images
uses: docker/build-push-action@v2
with:
context: .
file: ${{matrix.dockerfile}}
push: true
tags: ${{steps.meta.outputs.tags}}
labels: ${{steps.meta.outputs.labels}}