Skip to content

Merge pull request #48 from smkent/manage-cookie #85

Merge pull request #48 from smkent/manage-cookie

Merge pull request #48 from smkent/manage-cookie #85

Workflow file for this run

---
name: Build
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
RELEASE_PYTHON_VERSION: "3.12"
RELEASE_POETRY_VERSION: "1.6"
on:
pull_request:
push:
branches:
- '*'
tags:
- 'v*'
workflow_dispatch:
jobs:
Container:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: πŸ’Ύ Check out repository
uses: actions/checkout@v3
- name: πŸ”‘ Log in to the container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: πŸ“‘ Collect image metadata
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }}
type=edge,branch=main
- name: 🐍 Set up Python project with Poetry
uses: ./.github/workflows/actions/python-poetry
with:
python_version: ${{ env.RELEASE_PYTHON_VERSION }}
poetry_version: ${{ env.RELEASE_POETRY_VERSION }}
- name: πŸ”₯ Test
run: poetry run poe test
- name: πŸ“¦ Build and publish container image
uses: docker/[email protected]
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
"POETRY_DYNAMIC_VERSIONING_BYPASS=${{ env.PROJECT_VERSION }}"