-
Notifications
You must be signed in to change notification settings - Fork 5
30 lines (28 loc) · 1.06 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Build for production
on:
workflow_dispatch:
inputs:
envType:
description: "Environment to deploy to"
required: true
default: "prod"
type: choice
options:
- prod
- staging
jobs:
build:
runs-on: ubuntu-latest
environment: ${{ 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 . --build-arg API_URL=${{ secrets.API_URL }} -t ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/fo-${{ inputs.envType }}
- name: Push the Docker Image
run: docker push ${{ secrets.CONTAINER_REGISTRY_ENDPOINT }}/fo-${{ inputs.envType }}