Skip to content

Merge pull request #113 from smkent/manage-cookie #154

Merge pull request #113 from smkent/manage-cookie

Merge pull request #113 from smkent/manage-cookie #154

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/login-action@v2.1.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 馃摗 Collect image metadata
id: meta
uses: docker/metadata-action@v4.3.0
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/build-push-action@v4.0.0
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 }}"