Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into site-campagne-ademe
Browse files Browse the repository at this point in the history
  • Loading branch information
mariheck committed Sep 30, 2024
2 parents 6230c76 + be36d28 commit 69dbbb2
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 89 deletions.
50 changes: 20 additions & 30 deletions .github/workflows/cd-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,25 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
- uses: earthly/actions-setup@v1
with:
version: v0.7.20
github-token: ${{ secrets.GH_TOKEN }}
version: ^0.8.0
- 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
run: docker login ghcr.io/territoiresentransitions --username "${{ secrets.GH_USER }}" --password "${{ secrets.GH_TOKEN }}"

- name: Build and push app image
run: >
earthly
--use-inline-cache --save-inline-cache --push
--platform=linux/amd64
earthly
--use-inline-cache --save-inline-cache --push
--platform=linux/amd64
+app-build
--ENV_NAME=${{ github.event.inputs.target }}
--ANON_KEY=${{ secrets.ANON_KEY }} --API_URL=${{ secrets.API_URL }}
--SENTRY_DSN=${{ vars.SENTRY_DSN }}
--CRISP_WEBSITE_ID=${{ vars.CRISP_WEBSITE_ID }}
--BACKEND_URL=${{ vars.BACKEND_URL }}
--POSTHOG_HOST=${{ secrets.POSTHOG_HOST }} --POSTHOG_KEY=${{ secrets.POSTHOG_KEY }}
--POSTHOG_HOST=${{ secrets.POSTHOG_HOST }} --POSTHOG_KEY=${{ secrets.POSTHOG_KEY }}
deploy-app:
name: Déploie l'app
Expand All @@ -62,19 +56,17 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: earthly/actions-setup@v1
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
github-token: ${{ secrets.GH_TOKEN }}
version: ^0.8.0
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ secrets.GH_TOKEN }}
run: docker login ghcr.io/territoiresentransitions --username "${{ secrets.GH_USER }}" --password "${{ secrets.GH_TOKEN }}"

- name: Deploy app on Koyeb
run: >
earthly
--use-inline-cache
earthly
--use-inline-cache --save-inline-cache
+app-deploy
--ENV_NAME=${{ github.event.inputs.target }}
--KOYEB_API_KEY=${{ secrets.KOYEB_API_KEY }}
Expand All @@ -89,19 +81,17 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: earthly/actions-setup@v1
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
github-token: ${{ secrets.GH_TOKEN }}
version: ^0.8.0
- name: Login into registry
run: earthly --use-inline-cache +docker-dev-login --GH_USER=${{ secrets.GH_USER }} --GH_TOKEN=${{ secrets.GH_TOKEN }}
run: docker login ghcr.io/territoiresentransitions --username "${{ secrets.GH_USER }}" --password "${{ secrets.GH_TOKEN }}"

- name: Deploy test app on Koyeb
run: >
earthly
--use-inline-cache
earthly
--use-inline-cache --save-inline-cache
+app-deploy-test
--ENV_NAME=${{ github.event.inputs.target }}
--KOYEB_API_KEY=${{ secrets.KOYEB_API_KEY }}
29 changes: 10 additions & 19 deletions .github/workflows/cd-auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,27 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: earthly/actions-setup@v1
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
github-token: ${{ secrets.GH_TOKEN }}
version: ^0.8.0
- 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
run: docker login ghcr.io/territoiresentransitions --username "${{ secrets.GH_USER }}" --password "${{ secrets.GH_TOKEN }}"

- name: Build and push auth image
run: >
earthly
--use-inline-cache --save-inline-cache --push
--platform=linux/amd64
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 }}
--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
earthly
--use-inline-cache
+auth-deploy
--ENV_NAME=${{ github.event.inputs.target }}
--KOYEB_API_KEY=${{ secrets.KOYEB_API_KEY }}
31 changes: 11 additions & 20 deletions .github/workflows/cd-panier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,28 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: earthly/actions-setup@v1
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
github-token: ${{ secrets.GH_TOKEN }}
version: ^0.8.0
- 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
run: docker login ghcr.io/territoiresentransitions --username "${{ secrets.GH_USER }}" --password "${{ secrets.GH_TOKEN }}"

- name: Build and push panier image
run: >
earthly
--use-inline-cache --save-inline-cache --push
--platform=linux/amd64
earthly
--use-inline-cache --save-inline-cache --push
--platform=linux/amd64
+panier-build
--ENV_NAME=${{ github.event.inputs.target }}
--POSTHOG_HOST=${{ secrets.POSTHOG_HOST }} --POSTHOG_KEY=${{ secrets.POSTHOG_KEY }}
--AXEPTIO_ID=${{ vars.AXEPTIO_ID }}
--POSTHOG_HOST=${{ secrets.POSTHOG_HOST }} --POSTHOG_KEY=${{ secrets.POSTHOG_KEY }}
--AXEPTIO_ID=${{ vars.AXEPTIO_ID }}
--ANON_KEY=${{ secrets.ANON_KEY }} --API_URL=${{ secrets.API_URL }}
- name: Deploy panier on Koyeb
run: >
earthly
--use-inline-cache
earthly
--use-inline-cache
+panier-deploy
--ENV_NAME=${{ github.event.inputs.target }}
--KOYEB_API_KEY=${{ secrets.KOYEB_API_KEY }}
31 changes: 11 additions & 20 deletions .github/workflows/cd-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,29 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: earthly/actions-setup@v1
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- uses: earthly/actions/setup-earthly@v1
with:
version: v0.7.20
github-token: ${{ secrets.GH_TOKEN }}
version: ^0.8.0
- 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
run: docker login ghcr.io/territoiresentransitions --username "${{ secrets.GH_USER }}" --password "${{ secrets.GH_TOKEN }}"

- name: Build and push site image
run: >
earthly
--use-inline-cache --save-inline-cache --push
--platform=linux/amd64
earthly
--use-inline-cache --save-inline-cache --push
--platform=linux/amd64
+site-build
--ENV_NAME=${{ github.event.inputs.target }}
--ANON_KEY=${{ secrets.ANON_KEY }} --API_URL=${{ secrets.API_URL }}
--STRAPI_KEY=${{ secrets.STRAPI_KEY }} --STRAPI_URL=${{ secrets.STRAPI_URL }}
--POSTHOG_HOST=${{ secrets.POSTHOG_HOST }} --POSTHOG_KEY=${{ secrets.POSTHOG_KEY }}
--STRAPI_KEY=${{ secrets.STRAPI_KEY }} --STRAPI_URL=${{ secrets.STRAPI_URL }}
--POSTHOG_HOST=${{ secrets.POSTHOG_HOST }} --POSTHOG_KEY=${{ secrets.POSTHOG_KEY }}
--AXEPTIO_ID=${{ vars.AXEPTIO_ID }}
- name: Deploy site on Koyeb
run: >
earthly
--use-inline-cache
earthly
--use-inline-cache
+site-deploy
--ENV_NAME=${{ github.event.inputs.target }}
--KOYEB_API_KEY=${{ secrets.KOYEB_API_KEY }}

0 comments on commit 69dbbb2

Please sign in to comment.