.github/workflows/deploy.yml aktualisiert
Some checks failed
Build, Push and GitOps Deploy / test-and-deploy (push) Failing after 45s

This commit is contained in:
bast 2026-10-31 01:28:20 +00:00
parent f9c8aac58b
commit 8a14b9edaf

View file

@ -8,17 +8,21 @@ on:
jobs: jobs:
test-and-deploy: test-and-deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# HIER: Wir wechseln auf das offizielle, öffentliche HashiCorp-Image! # HIER: Das offizielle, voll ausgestattete Image der Pipeline-Macher
container: hashicorp/terraform:1.7.0 container: catthehacker/ubuntu:act-latest
steps: steps:
- name: Install Terraform
run: |
apt-get update && apt-get install -y wget gpg lsb-release
wget -O- https://hashicorp.com | gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://hashicorp.com $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/hashicorp.list
apt-get update && apt-get install -y terraform
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v4 uses: actions/checkout@v4
# Da dieses Image rein für Terraform ist, führen wir deine Befehle direkt über die Shell aus
- name: Log in to Local Registry - name: Log in to Local Registry
run: | run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login forgejo:3000 -u ${{ github.actor }} --password-stdin
apk add --no-cache docker-cli
echo "${{ secrets.GITHUB_TOKEN }}" | docker login forgejo:3000 -u ${{ github.actor }} --password-stdin
- name: Inject Version into Dockerfile - name: Inject Version into Dockerfile
run: sed -i "s/{{APP_VERSION}}/${{ github.sha }}/g" Dockerfile run: sed -i "s/{{APP_VERSION}}/${{ github.sha }}/g" Dockerfile
@ -40,7 +44,6 @@ jobs:
- name: Verify App Health - name: Verify App Health
run: | run: |
apk add --no-cache curl
echo "Warte auf das Ingress-Routing..." echo "Warte auf das Ingress-Routing..."
sleep 15 sleep 15
curl --fail --connect-timeout 5 http://local-k3s-platform:80/ || exit 1 curl --fail --connect-timeout 5 http://local-k3s-platform:80/ || exit 1