Files
chill-base-app-v3/.gitea/workflows/release/build-image.yaml
T
2026-11-24 04:04:39 +00:00

48 lines
1.9 KiB
YAML

name: build-images
on:
push:
tags:
- 'v*'
jobs:
build-and-push:
runs-on: cth-ubuntu-latest
steps:
- name: Checkout
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Log in to Docker Registry
uses: https://github.com/docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
registry: h3m6q87t.gra7.container-registry.ovh.net
username: ${{ vars.OVH_REGISTRY_USERNAME }}
password: ${{ secrets.OVH_REGISTRY_PASSWORD }}
- name: Install Dependencies and Build Assets
uses: docker://chill/base-image:8.5-edge@sha256:84f7504a4c9b0df514855b7b0be10c0dee3ae1bd08709ae0ba715f2acfca4071
env:
APP_ENV: prod
with:
entrypoint: /bin/sh
# We install node/npm inside the PHP container: the Vite build needs the translations dumped by cache:warmup
args: -c "apk add --no-cache nodejs npm && composer install --no-scripts --no-interaction && bin/console cache:warmup && npm ci && npm run build"
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Build and Push PHP Image
uses: https://github.com/docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
with:
context: .
file: Dockerfile
push: true
tags: h3m6q87t.gra7.container-registry.ovh.net/chillbasics/php:${{ github.ref_name }}
- name: Build and Push Nginx Image
uses: https://github.com/docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
with:
context: .
file: docker/nginx/Dockerfile
push: true
tags: h3m6q87t.gra7.container-registry.ovh.net/chillbasics/nginx:${{ github.ref_name }}