Skip to content
This repository was archived by the owner on Jun 26, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/deactivate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:
- "!**-persist-**"

jobs:
socialgouv:
uses: socialgouv/workflows/.github/workflows/use-ks-gh-deactivate.yaml@v1
kontinuous:
name: "Deploy on Kubernetes 🐳"
uses: socialgouv/workflows/.github/workflows/use-ks-gh-deactivate-atlas.yaml@v1
secrets: inherit
64 changes: 49 additions & 15 deletions .github/workflows/preproduction.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,51 @@
#name: 😎 PreProd
#on:
# workflow_dispatch:
# push:
# branches:
# - "master"
# - "main"
name: 😎 PreProd
on:
workflow_dispatch:
push:
branches:
- "master"
- "main"

#concurrency:
# cancel-in-progress: true
# group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }}
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }}

#jobs:
# socialgouv:
# name: "🇫🇷 SocialGouv"
# uses: socialgouv/workflows/.github/workflows/use-ks-gh-preproduction.yaml@v1
# secrets: inherit
jobs:
build-app:
environment: build-preproduction
outputs:
tags: ${{ steps.meta.outputs.tags }}
runs-on: ubuntu-latest
steps:
- name: ⏬ Checkout code repository
uses: actions/checkout@v4

- name: 📌 Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ vars.REGISTRY_URL }}/${{ vars.PROJECT_NAME }}/${{ github.event.repository.name }}/app
tags: |
type=sha,prefix=preprod-,format=long,priority=850
type=sha,prefix=sha-,format=long,priority=890

- name: 📦 Build and push Docker image for app
uses: socialgouv/workflows/actions/buildkit@v1
with:
context: "./api"
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
registry: "${{ vars.REGISTRY_URL }}"
registry-username: "${{ secrets.REGISTRY_USERNAME }}"
registry-password: "${{ secrets.REGISTRY_PASSWORD }}"
buildkit-cert-ca: "${{ secrets.BUILDKIT_CERT_CA }}"
buildkit-cert: "${{ secrets.BUILDKIT_CERT }}"
buildkit-cert-key: "${{ secrets.BUILDKIT_CERT_KEY }}"
buildkit-svc-count: ${{ vars.BUILDKIT_SVC_COUNT }}
buildkit-daemon-address: ${{ vars.BUILDKIT_DAEMON_ADDRESS }}

kontinuous:
needs: [build-app]
name: "Deploy on Kubernetes 🐳"
uses: socialgouv/workflows/.github/workflows/use-ks-gh-preproduction-atlas.yaml@v1
secrets: inherit
41 changes: 38 additions & 3 deletions .github/workflows/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,42 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }}

jobs:
socialgouv:
name: "🇫🇷 SocialGouv"
uses: socialgouv/workflows/.github/workflows/use-ks-gh-production.yaml@v1
build-app:
environment: build-production
outputs:
tags: ${{ steps.meta.outputs.tags }}
runs-on: ubuntu-latest
steps:
- name: ⏬ Checkout code repository
uses: actions/checkout@v4

- name: 📌 Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ vars.REGISTRY_URL }}/${{ vars.PROJECT_NAME }}/${{ github.event.repository.name }}/app
tags: |
type=semver,pattern=v{{version}},priority=900
type=sha,prefix=sha-,format=long,priority=890
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }},priority=200

- name: 📦 Build and push Docker image for app
uses: socialgouv/workflows/actions/buildkit@v1
with:
context: "./api"
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
registry: "${{ vars.REGISTRY_URL }}"
registry-username: "${{ secrets.REGISTRY_USERNAME }}"
registry-password: "${{ secrets.REGISTRY_PASSWORD }}"
buildkit-cert-ca: "${{ secrets.BUILDKIT_CERT_CA }}"
buildkit-cert: "${{ secrets.BUILDKIT_CERT }}"
buildkit-cert-key: "${{ secrets.BUILDKIT_CERT_KEY }}"
buildkit-svc-count: ${{ vars.BUILDKIT_SVC_COUNT }}
buildkit-daemon-address: ${{ vars.BUILDKIT_DAEMON_ADDRESS }}

kontinuous:
needs: [build-app]
name: "Deploy on Kubernetes 🐳"
uses: socialgouv/workflows/.github/workflows/use-ks-gh-production-atlas.yaml@v1
secrets: inherit
47 changes: 44 additions & 3 deletions .github/workflows/review-auto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,48 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }}

jobs:
socialgouv:
name: "🇫🇷 SocialGouv"
uses: socialgouv/workflows/.github/workflows/use-ks-gh-review-auto.yaml@v1
build-app:
environment: build-review-auto
outputs:
tags: ${{ steps.meta.outputs.tags }}
runs-on: ubuntu-latest
steps:
- name: ⏬ Checkout code repository
uses: actions/checkout@v4

- name: 📌 Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ vars.REGISTRY_URL }}/${{ vars.PROJECT_NAME }}/${{ github.event.repository.name }}/app
tags: |
type=sha,prefix=persist-,format=long,enable=${{
github.ref_name == 'dev' ||
github.ref_name == 'develop' ||
github.ref_name == 'preprod' ||
github.ref_name == 'main' ||
github.ref_name == 'master'
}},priority=840
type=sha,prefix=sha-,format=long,priority=890
type=ref,event=branch,priority=600

- name: 📦 Build and push Docker image for app
uses: socialgouv/workflows/actions/buildkit@v1
with:
context: "./api"
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
registry: "${{ vars.REGISTRY_URL }}"
registry-username: "${{ secrets.REGISTRY_USERNAME }}"
registry-password: "${{ secrets.REGISTRY_PASSWORD }}"
buildkit-cert-ca: "${{ secrets.BUILDKIT_CERT_CA }}"
buildkit-cert: "${{ secrets.BUILDKIT_CERT }}"
buildkit-cert-key: "${{ secrets.BUILDKIT_CERT_KEY }}"
buildkit-svc-count: ${{ vars.BUILDKIT_SVC_COUNT }}
buildkit-daemon-address: ${{ vars.BUILDKIT_DAEMON_ADDRESS }}

kontinuous:
needs: [build-app]
name: "Deploy on Kubernetes 🐳"
uses: socialgouv/workflows/.github/workflows/use-ks-gh-review-auto-atlas.yaml@v1
secrets: inherit
47 changes: 44 additions & 3 deletions .github/workflows/review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,48 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }}

jobs:
socialgouv:
name: "🇫🇷 SocialGouv"
uses: socialgouv/workflows/.github/workflows/use-ks-gh-review.yaml@v1
build-app:
environment: build-review
outputs:
tags: ${{ steps.meta.outputs.tags }}
runs-on: ubuntu-latest
steps:
- name: ⏬ Checkout code repository
uses: actions/checkout@v4

- name: 📌 Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ vars.REGISTRY_URL }}/${{ vars.PROJECT_NAME }}/${{ github.event.repository.name }}/app
tags: |
type=sha,prefix=persist-,format=long,enable=${{
github.ref_name == 'dev' ||
github.ref_name == 'develop' ||
github.ref_name == 'preprod' ||
github.ref_name == 'main' ||
github.ref_name == 'master'
}},priority=840
type=sha,prefix=sha-,format=long,priority=890
type=ref,event=branch,priority=600

- name: 📦 Build and push Docker image for app
uses: socialgouv/workflows/actions/buildkit@v1
with:
context: "./api"
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
registry: "${{ vars.REGISTRY_URL }}"
registry-username: "${{ secrets.REGISTRY_USERNAME }}"
registry-password: "${{ secrets.REGISTRY_PASSWORD }}"
buildkit-cert-ca: "${{ secrets.BUILDKIT_CERT_CA }}"
buildkit-cert: "${{ secrets.BUILDKIT_CERT }}"
buildkit-cert-key: "${{ secrets.BUILDKIT_CERT_KEY }}"
buildkit-svc-count: ${{ vars.BUILDKIT_SVC_COUNT }}
buildkit-daemon-address: ${{ vars.BUILDKIT_DAEMON_ADDRESS }}

kontinuous:
needs: [build-app]
name: "Deploy on Kubernetes 🐳"
uses: socialgouv/workflows/.github/workflows/use-ks-gh-review-atlas.yaml@v1
secrets: inherit
8 changes: 1 addition & 7 deletions .kontinuous/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# yaml-language-server: $schema=../../kontinuous/docs/values.schema.json

app:
~needs: [build-app, pg]
~needs: [pg]
containerPort: 3000
probesPath: /healthz
envFrom:
Expand All @@ -12,9 +12,3 @@ app:

pg:
~chart: pg

jobs:
runs:
build-app:
with:
context: api
Empty file removed .socialgouv.yaml
Empty file.
Loading