diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index e3f3b67..4ac0f2f 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -30,10 +30,13 @@ jobs: name: Build & Push to Registry runs-on: ubuntu-latest needs: test - if: startsWith(github.ref, 'refs/tags/v') + if: github.ref_type == 'tag' && startsWith(github.ref_name, 'v') steps: - name: Debug ref - run: echo "github.ref = ${{ github.ref }}" + run: | + echo "github.ref = ${{ github.ref }}" + echo "github.ref_type = ${{ github.ref_type }}" + echo "github.ref_name = ${{ github.ref_name }}" - name: Checkout code uses: actions/checkout@v4 diff --git a/brain/Dockerfile b/brain/Dockerfile index 64f710b..4f963bf 100644 --- a/brain/Dockerfile +++ b/brain/Dockerfile @@ -6,7 +6,7 @@ ARG RUNNER # =========================================== # Stage 1: Builder # =========================================== -FROM python:${PYTHON_VERSION}-slim-bookworm as builder +FROM python:${PYTHON_VERSION}-slim-bookworm AS builder # Re-declare ARGs after FROM to make them available in this stage ARG RUNNER @@ -45,7 +45,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \ # =========================================== # Stage 2: Testing # =========================================== -FROM builder as test +FROM builder AS test ARG RUNNER @@ -68,7 +68,7 @@ COPY brain/app.py . # =========================================== # Stage 3: Runtime # =========================================== -FROM python:${PYTHON_VERSION}-slim-bookworm as runtime +FROM python:${PYTHON_VERSION}-slim-bookworm AS runtime ARG PYTHON_VERSION_SHORT