-
Notifications
You must be signed in to change notification settings - Fork 7
55 lines (49 loc) · 1.66 KB
/
cd-auth.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Déploiement à la demande du module d'auth.
run-name: Déploiement du module d'auth. sur ${{ github.event.inputs.target }}
on:
workflow_dispatch:
inputs:
target:
type: choice
description: Où déployer
options:
- preprod
- prod
jobs:
deploy-panier:
name: Déploie le module d'auth.
environment: ${{ github.event.inputs.target }}
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ secrets.GH_TOKEN }}
- name: Build and push front deps image
run: >
earthly
--use-inline-cache --save-inline-cache --push
--platform=linux/amd64
+front-deps-builder
- name: Build and push auth image
run: >
earthly
--use-inline-cache --save-inline-cache --push
--platform=linux/amd64
+auth-build
--ENV_NAME=${{ github.event.inputs.target }}
--POSTHOG_HOST=${{ secrets.POSTHOG_HOST }} --POSTHOG_KEY=${{ secrets.POSTHOG_KEY }}
--ANON_KEY=${{ secrets.ANON_KEY }} --API_URL=${{ secrets.API_URL }}
- name: Deploy auth on Koyeb
run: >
earthly
--use-inline-cache
+auth-deploy
--ENV_NAME=${{ github.event.inputs.target }}
--KOYEB_API_KEY=${{ secrets.KOYEB_API_KEY }}