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
44 changes: 44 additions & 0 deletions .github/workflows/ci-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,47 @@ jobs:
tags: ash-backend:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max

push-registry:
name: Push to Scaleway Registry
runs-on: ubuntu-latest
needs: [test, clippy, docker]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
environment: prod

env:
REGISTRY: rg.fr-par.scw.cloud
IMAGE_NAME: ash-backend

steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Scaleway Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: nologin
password: ${{ secrets.SCW_SECRET_KEY }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ secrets.SCW_PROJECT_ID }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,prefix=
type=raw,value=latest

- name: Build and push
uses: docker/build-push-action@v6
with:
context: ./backend
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# -----------------------------------------------------------------------------
# Stage 1: Chef - Install cargo-chef for dependency caching
# -----------------------------------------------------------------------------
FROM rust:1.75-slim-bookworm AS chef
FROM rust:1.83-slim-bookworm AS chef

RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config \
Expand Down