Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
release:
types: [ published ]

permissions:
contents: read
packages: write

env:
PYTHON_VERSION: "3.13"
REGISTRY: ghcr.io
Expand Down Expand Up @@ -130,7 +134,7 @@ jobs:
name: Build Docker Image
runs-on: ubuntu-latest
needs: [test, security]
if: github.event_name == 'push' || github.event_name == 'release'
if: (github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop')) || github.event_name == 'release'

steps:
- name: Checkout code
Expand Down Expand Up @@ -158,6 +162,16 @@ jobs:
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix={{branch}}-

- name: Build Docker image (test)
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
push: false
tags: test-image:latest
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
Expand All @@ -168,6 +182,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
continue-on-error: true

deploy-staging:
name: Deploy to Staging
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# pull official base image
FROM python:3.13-slim-bookworm as builder
FROM python:3.13-slim-bookworm AS builder

# set work directory
WORKDIR /usr/src/app
Expand Down
Loading