Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit d1aa0f6

Browse files
authored
fix: buildkit in gh (#478)
* fix: buildkit in gh * chore: clean
1 parent 0fc268a commit d1aa0f6

7 files changed

Lines changed: 170 additions & 19 deletions

File tree

.github/workflows/deactivate.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ on:
1818
- "!**-persist-**"
1919

2020
jobs:
21-
socialgouv:
22-
uses: socialgouv/workflows/.github/workflows/use-ks-gh-deactivate.yaml@v1
21+
kontinuous:
22+
uses: socialgouv/workflows/.github/workflows/use-ks-gh-deactivate-atlas.yaml@v1
2323
secrets: inherit

.github/workflows/preproduction.yaml

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,42 @@ concurrency:
1313
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }}
1414

1515
jobs:
16-
socialgouv:
16+
build-app:
17+
environment: build-preproduction
18+
outputs:
19+
tags: ${{ steps.meta.outputs.tags }}
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: ⏬ Checkout code repository
23+
uses: actions/checkout@v4
24+
25+
- name: 📌 Extract metadata (tags, labels) for Docker
26+
id: meta
27+
uses: docker/metadata-action@v5
28+
with:
29+
images: ${{ vars.REGISTRY_URL }}/${{ vars.PROJECT_NAME }}/${{ github.event.repository.name }}/app
30+
tags: |
31+
type=sha,prefix=preprod-,format=long,priority=850
32+
type=sha,prefix=sha-,format=long,priority=890
33+
34+
- name: 📦 Build and push Docker image for app
35+
uses: socialgouv/workflows/actions/buildkit@v1
36+
with:
37+
context: "."
38+
dockerfile: "Dockerfile"
39+
tags: ${{ steps.meta.outputs.tags }}
40+
labels: ${{ steps.meta.outputs.labels }}
41+
registry: "${{ vars.REGISTRY_URL }}"
42+
registry-username: "${{ secrets.REGISTRY_USERNAME }}"
43+
registry-password: "${{ secrets.REGISTRY_PASSWORD }}"
44+
buildkit-cert-ca: "${{ secrets.BUILDKIT_CERT_CA }}"
45+
buildkit-cert: "${{ secrets.BUILDKIT_CERT }}"
46+
buildkit-cert-key: "${{ secrets.BUILDKIT_CERT_KEY }}"
47+
buildkit-svc-count: ${{ vars.BUILDKIT_SVC_COUNT }}
48+
buildkit-daemon-address: ${{ vars.BUILDKIT_DAEMON_ADDRESS }}
49+
50+
kontinuous:
51+
needs: [build-app]
1752
name: "🇫🇷 SocialGouv"
18-
uses: socialgouv/workflows/.github/workflows/use-ks-gh-preproduction.yaml@v1
53+
uses: socialgouv/workflows/.github/workflows/use-ks-gh-preproduction-atlas.yaml@v1
1954
secrets: inherit

.github/workflows/production.yaml

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,43 @@ concurrency:
1010
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }}
1111

1212
jobs:
13-
socialgouv:
13+
build-app:
14+
environment: build-production
15+
outputs:
16+
tags: ${{ steps.meta.outputs.tags }}
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: ⏬ Checkout code repository
20+
uses: actions/checkout@v4
21+
22+
- name: 📌 Extract metadata (tags, labels) for Docker
23+
id: meta
24+
uses: docker/metadata-action@v5
25+
with:
26+
images: ${{ vars.REGISTRY_URL }}/${{ vars.PROJECT_NAME }}/${{ github.event.repository.name }}/app
27+
tags: |
28+
type=semver,pattern=v{{version}},priority=900
29+
type=sha,prefix=sha-,format=long,priority=890
30+
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }},priority=200
31+
32+
- name: 📦 Build and push Docker image for app
33+
uses: socialgouv/workflows/actions/buildkit@v1
34+
with:
35+
context: "."
36+
dockerfile: "Dockerfile"
37+
tags: ${{ steps.meta.outputs.tags }}
38+
labels: ${{ steps.meta.outputs.labels }}
39+
registry: "${{ vars.REGISTRY_URL }}"
40+
registry-username: "${{ secrets.REGISTRY_USERNAME }}"
41+
registry-password: "${{ secrets.REGISTRY_PASSWORD }}"
42+
buildkit-cert-ca: "${{ secrets.BUILDKIT_CERT_CA }}"
43+
buildkit-cert: "${{ secrets.BUILDKIT_CERT }}"
44+
buildkit-cert-key: "${{ secrets.BUILDKIT_CERT_KEY }}"
45+
buildkit-svc-count: ${{ vars.BUILDKIT_SVC_COUNT }}
46+
buildkit-daemon-address: ${{ vars.BUILDKIT_DAEMON_ADDRESS }}
47+
48+
kontinuous:
49+
needs: [build-app]
1450
name: "🇫🇷 SocialGouv"
15-
uses: socialgouv/workflows/.github/workflows/use-ks-gh-production.yaml@v1
51+
uses: socialgouv/workflows/.github/workflows/use-ks-gh-production-atlas.yaml@v1
1652
secrets: inherit

.github/workflows/review-auto.yaml

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,49 @@ concurrency:
1010
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }}
1111

1212
jobs:
13-
socialgouv:
13+
build-app:
14+
environment: build-review-auto
15+
outputs:
16+
tags: ${{ steps.meta.outputs.tags }}
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: ⏬ Checkout code repository
20+
uses: actions/checkout@v4
21+
22+
- name: 📌 Extract metadata (tags, labels) for Docker
23+
id: meta
24+
uses: docker/metadata-action@v5
25+
with:
26+
images: ${{ vars.REGISTRY_URL }}/${{ vars.PROJECT_NAME }}/${{ github.event.repository.name }}/app
27+
tags: |
28+
type=sha,prefix=persist-,format=long,enable=${{
29+
github.ref_name == 'dev' ||
30+
github.ref_name == 'develop' ||
31+
github.ref_name == 'preprod' ||
32+
github.ref_name == 'main' ||
33+
github.ref_name == 'master'
34+
}},priority=840
35+
type=sha,prefix=sha-,format=long,priority=890
36+
type=ref,event=branch,priority=600
37+
38+
- name: 📦 Build and push Docker image for app
39+
uses: socialgouv/workflows/actions/buildkit@v1
40+
with:
41+
context: "."
42+
dockerfile: "Dockerfile"
43+
tags: ${{ steps.meta.outputs.tags }}
44+
labels: ${{ steps.meta.outputs.labels }}
45+
registry: "${{ vars.REGISTRY_URL }}"
46+
registry-username: "${{ secrets.REGISTRY_USERNAME }}"
47+
registry-password: "${{ secrets.REGISTRY_PASSWORD }}"
48+
buildkit-cert-ca: "${{ secrets.BUILDKIT_CERT_CA }}"
49+
buildkit-cert: "${{ secrets.BUILDKIT_CERT }}"
50+
buildkit-cert-key: "${{ secrets.BUILDKIT_CERT_KEY }}"
51+
buildkit-svc-count: ${{ vars.BUILDKIT_SVC_COUNT }}
52+
buildkit-daemon-address: ${{ vars.BUILDKIT_DAEMON_ADDRESS }}
53+
54+
kontinuous:
55+
needs: [build-app]
1456
name: "🇫🇷 SocialGouv"
15-
uses: socialgouv/workflows/.github/workflows/use-ks-gh-review-auto.yaml@v1
57+
uses: socialgouv/workflows/.github/workflows/use-ks-gh-review-auto-atlas.yaml@v1
1658
secrets: inherit

.github/workflows/review.yaml

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,49 @@ concurrency:
1313
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.ref }}
1414

1515
jobs:
16-
socialgouv:
16+
build-app:
17+
environment: build-review
18+
outputs:
19+
tags: ${{ steps.meta.outputs.tags }}
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: ⏬ Checkout code repository
23+
uses: actions/checkout@v4
24+
25+
- name: 📌 Extract metadata (tags, labels) for Docker
26+
id: meta
27+
uses: docker/metadata-action@v5
28+
with:
29+
images: ${{ vars.REGISTRY_URL }}/${{ vars.PROJECT_NAME }}/${{ github.event.repository.name }}/app
30+
tags: |
31+
type=sha,prefix=persist-,format=long,enable=${{
32+
github.ref_name == 'dev' ||
33+
github.ref_name == 'develop' ||
34+
github.ref_name == 'preprod' ||
35+
github.ref_name == 'main' ||
36+
github.ref_name == 'master'
37+
}},priority=840
38+
type=sha,prefix=sha-,format=long,priority=890
39+
type=ref,event=branch,priority=600
40+
41+
- name: 📦 Build and push Docker image for app
42+
uses: socialgouv/workflows/actions/buildkit@v1
43+
with:
44+
context: "."
45+
dockerfile: "Dockerfile"
46+
tags: ${{ steps.meta.outputs.tags }}
47+
labels: ${{ steps.meta.outputs.labels }}
48+
registry: "${{ vars.REGISTRY_URL }}"
49+
registry-username: "${{ secrets.REGISTRY_USERNAME }}"
50+
registry-password: "${{ secrets.REGISTRY_PASSWORD }}"
51+
buildkit-cert-ca: "${{ secrets.BUILDKIT_CERT_CA }}"
52+
buildkit-cert: "${{ secrets.BUILDKIT_CERT }}"
53+
buildkit-cert-key: "${{ secrets.BUILDKIT_CERT_KEY }}"
54+
buildkit-svc-count: ${{ vars.BUILDKIT_SVC_COUNT }}
55+
buildkit-daemon-address: ${{ vars.BUILDKIT_DAEMON_ADDRESS }}
56+
57+
kontinuous:
58+
needs: [build-app]
1759
name: "🇫🇷 SocialGouv"
18-
uses: socialgouv/workflows/.github/workflows/use-ks-gh-review.yaml@v1
19-
secrets: inherit
60+
uses: socialgouv/workflows/.github/workflows/use-ks-gh-review-atlas.yaml@v1
61+
secrets: inherit

.kontinuous/config.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
projectName: fabrique
2-
ciNamespace: ci-fabrique
3-
4-
dependencies:
5-
fabrique:
6-
extends:
7-
- name: ovh
8-
- name: buildkit-service
1+
projectName: fabrique

.kontinuous/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
app:
2+
~chart: app
3+
imagePackage: app
4+
containerPort: 8080
25
envFrom:
36
- secretRef:
47
name: standup-sealed-secret

0 commit comments

Comments
 (0)