mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-06-08 00:24:21 +02:00
30 lines
1.0 KiB
YAML
30 lines
1.0 KiB
YAML
name: Build for production
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
envType:
|
|
description: "Environment to deploy to"
|
|
required: true
|
|
default: "prod"
|
|
type: choice
|
|
options:
|
|
- prod
|
|
- staging
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
environment: ${{ github.event.inputs.envType }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Login to Scaleway Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: nologin
|
|
password: ${{ secrets.SCALEWAY_API_KEY }}
|
|
registry: ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}
|
|
- name: Build the Docker image
|
|
run: docker build . -t ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/fo-${{ github.event.inputs.envType }}
|
|
- name: Push the Docker Image
|
|
run: docker push ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/fo-${{ github.event.inputs.envType }}
|