Ajout Workflow
parent
2cc689b3d4
commit
6306c1aaed
|
|
@ -1,37 +1,52 @@
|
||||||
name: Build
|
name: Build
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push-image:
|
build-and-push-image:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # Important pour récupérer tout l'historique Git
|
||||||
|
|
||||||
|
- name: Install CA certificate in runner
|
||||||
|
run: |
|
||||||
|
# Copier le certificat depuis le volume monté vers un emplacement standard
|
||||||
|
sudo cp /certs/zen-ca.pem /usr/local/share/ca-certificates/zen-ca.crt
|
||||||
|
sudo update-ca-certificates
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
driver-opts: |
|
||||||
|
network=host
|
||||||
|
buildkitd-config-inline: |
|
||||||
|
# La configuration BuildKit va ici
|
||||||
|
debug = true
|
||||||
|
[registry."gitea.bv.stef.lan"]
|
||||||
|
http = false
|
||||||
|
insecure = false
|
||||||
|
[[registry."gitea.bv.stef.lan".tls]]
|
||||||
|
ca = ["/etc/ssl/certs/zen-ca.pem"]
|
||||||
|
cert = []
|
||||||
|
key = []
|
||||||
|
|
||||||
- name: Log in to registry
|
- name: Log in to registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: gitea.bv.stef.lan
|
registry: gitea.bv.stef.lan
|
||||||
username: stef
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
password: stef
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
contex: .
|
context: . # UTILISE LE CONTEXTE LOCAL, PAS L'URL GIT
|
||||||
push: true
|
push: true
|
||||||
tags: gitea.bv.stef.lan/stef/pki-manager:${{ github.sha }}
|
tags: gitea.bv.stef.lan/stef/pki-manager:v01
|
||||||
builder: ${{ steps.buildx.outputs.name }}
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
provenance: false # Peut simplifier le débogage initialement
|
||||||
build-args: |
|
build-args: |
|
||||||
BUILDKIT_CONTEXT_KEEP_GIT_DIR=1
|
BUILDKIT_CONTEXT_KEEP_GIT_DIR=1
|
||||||
# Configuration des registries avec certificat CA
|
|
||||||
config-inline: |
|
|
||||||
debug = true
|
|
||||||
[registry."gitea.bv.stef.lan"]
|
|
||||||
mirrors = ["gitea.bv.stef.lan"]
|
|
||||||
insecure = false
|
|
||||||
[[registry."gitea.bv.stef.lan".tls]]
|
|
||||||
ca = ["/usr/local/share/ca-certificates/custom-ca/zen-ca.crt"]
|
|
||||||
[registry."https://gitea.bv.stef.lan"]
|
|
||||||
mirrors = ["gitea.bv.stef.lan"]
|
|
||||||
insecure = false
|
|
||||||
[[registry."https://gitea.bv.stef.lan".tls]]
|
|
||||||
ca = [""/usr/local/share/ca-certificates/custom-ca/zen-ca.crt]
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue