Skip to content

build(dependency): ⬆️ bump pydantic from 2.4.2 to 2.6.0 #1189

build(dependency): ⬆️ bump pydantic from 2.4.2 to 2.6.0

build(dependency): ⬆️ bump pydantic from 2.4.2 to 2.6.0 #1189

Workflow file for this run

# SPDX-FileCopyrightText: © 2023 Romain Brault <mail@romainbrault.com>
#
# SPDX-License-Identifier: MIT
name: Container
env:
PYTHON_VERSION: "3.11"
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
on:
push:
branches: ["main"]
tags: ["v*"]
pull_request:
branches: ["main"]
jobs:
metadata:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4.7.1
id: setup-python
with:
python-version: ${{ env.PYTHON_VERSION }}
check-latest: true
- name: Upgrade python environment
run: |
pip install --constraint=.github/workflows/constraints.txt pip
pip --version
- name: Install Poetry
run: |
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
echo "version=$(poetry version --short)" >> "$GITHUB_OUTPUT"
poetry --version
- name: Check if there is a parent commit
id: check-parent-commit
run: |
echo "name=sha::$(git rev-parse --verify --quiet HEAD^)" >> $GITHUB_OUTPUT
- name: Detect and tag new version
id: check-version
if: steps.check-parent-commit.outputs.sha
uses: salsify/action-detect-and-tag-new-version@v2.0.3
with:
version-command: poetry version --short
build-container:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: metadata
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: metadata
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=pep440,pattern={{version}}
- name: Build Container Image And Push
uses: docker/build-push-action@v5
with:
context: .
file: Containerfile
build-args: |
BUILD_DATE=${{ github.event.repository.updated_at }}
VERSION=${{ needs.metadata.outputs.version }}
REVISION=${{ github.sha }}
TAG=${{ steps.metadata.outputs.tags }}
tags: ${{ steps.metadata.outputs.tags }}
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.metadata.outputs.labels }}