Skip to content

chore(deps): update dependency pydantic to v2 - autoclosed #207

chore(deps): update dependency pydantic to v2 - autoclosed

chore(deps): update dependency pydantic to v2 - autoclosed #207

name: Docker build and release
on:
push:
branches:
- "master"
tags:
- 'v*'
pull_request:
branches:
- "master"
env:
TARGET_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build_and_release:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Generate automatically tags https://github.com/docker/metadata-action
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Build the images
- name: Build and push docker
uses: docker/build-push-action@v3
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ env.TARGET_PLATFORMS }}
cache-from: type=gha
cache-to: type=gha,mode=max