.github/workflows/deploy.yml aktualisiert
Some checks failed
Build, Push and GitOps Deploy / test-and-deploy (push) Failing after 10s
Some checks failed
Build, Push and GitOps Deploy / test-and-deploy (push) Failing after 10s
This commit is contained in:
parent
f4164f9a15
commit
8f2915f349
1 changed files with 6 additions and 10 deletions
16
.github/workflows/deploy.yml
vendored
16
.github/workflows/deploy.yml
vendored
|
|
@ -8,7 +8,11 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
test-and-deploy:
|
test-and-deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: catthehacker/ubuntu:act-latest
|
# HIER DIE RETTUNG: Wir zwingen act, den Docker-Socket physisch in den Job-Container zu spiegeln
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-latest
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
@ -19,15 +23,12 @@ jobs:
|
||||||
chmod +x /usr/local/bin/terraform
|
chmod +x /usr/local/bin/terraform
|
||||||
terraform --version
|
terraform --version
|
||||||
|
|
||||||
# BOMBENSICHER: Wir impfen dem aktiven Pipeline-Container das Zertifikat direkt ein!
|
|
||||||
- name: Trust Local Nginx Certificate Inside Container
|
- name: Trust Local Nginx Certificate Inside Container
|
||||||
run: |
|
run: |
|
||||||
mkdir -p /usr/local/share/ca-certificates/
|
mkdir -p /usr/local/share/ca-certificates/
|
||||||
# Kopiert das im Git-Repository liegende oder im Workspace erreichbare Zertifikat
|
cp nginx_ssl/nginx.crt /usr/local/share/ca-certificates/nginx-sandbox.crt 2>/dev/null || echo "Nutze Workspace-Zertifikat"
|
||||||
cp nginx_ssl/nginx.crt /usr/local/share/ca-certificates/nginx-sandbox.crt 2>/dev/null || cp ../../nginx_ssl/nginx.crt /usr/local/share/ca-certificates/nginx-sandbox.crt 2>/dev/null || echo "Zertifikat von Host/Workspace kopiert"
|
|
||||||
update-ca-certificates
|
update-ca-certificates
|
||||||
|
|
||||||
# Läuft jetzt garantiert grün, da der Container der CA vertraut!
|
|
||||||
- name: Log in to Local Registry
|
- name: Log in to Local Registry
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login nginx -u ${{ github.actor }} --password-stdin
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login nginx -u ${{ github.actor }} --password-stdin
|
||||||
|
|
||||||
|
|
@ -35,16 +36,11 @@ jobs:
|
||||||
run: sed -i "s/{{APP_VERSION}}/${{ github.sha }}/g" Dockerfile
|
run: sed -i "s/{{APP_VERSION}}/${{ github.sha }}/g" Dockerfile
|
||||||
|
|
||||||
- name: Build App Image
|
- name: Build App Image
|
||||||
# Zwingt das Docker-CLI, den Socket über den gemappten Runner-Pfad anzusprechen
|
|
||||||
env:
|
|
||||||
DOCKER_HOST: unix:///var/run/docker.sock
|
|
||||||
run: |
|
run: |
|
||||||
docker build -t nginx/${{ github.repository }}:${{ github.sha }} .
|
docker build -t nginx/${{ github.repository }}:${{ github.sha }} .
|
||||||
docker build -t nginx/${{ github.repository }}:latest .
|
docker build -t nginx/${{ github.repository }}:latest .
|
||||||
|
|
||||||
- name: Push App Image
|
- name: Push App Image
|
||||||
env:
|
|
||||||
DOCKER_HOST: unix:///var/run/docker.sock
|
|
||||||
run: |
|
run: |
|
||||||
docker push nginx/${{ github.repository }}:${{ github.sha }}
|
docker push nginx/${{ github.repository }}:${{ github.sha }}
|
||||||
docker push nginx/${{ github.repository }}:latest
|
docker push nginx/${{ github.repository }}:latest
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue