.github/workflows/deploy.yml aktualisiert
Some checks failed
Build, Push and GitOps Deploy / test-and-deploy (push) Failing after 9s
Some checks failed
Build, Push and GitOps Deploy / test-and-deploy (push) Failing after 9s
This commit is contained in:
parent
bda3fb7bb8
commit
df313071ef
1 changed files with 9 additions and 8 deletions
17
.github/workflows/deploy.yml
vendored
17
.github/workflows/deploy.yml
vendored
|
|
@ -10,32 +10,33 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: catthehacker/ubuntu:act-latest
|
container: catthehacker/ubuntu:act-latest
|
||||||
steps:
|
steps:
|
||||||
# 1. Erst den Code (und das Binary) aus dem Git-Repo holen
|
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# 2. Das mitgelieferte Binary aktivieren (Bombensicher und netzwerkunabhängig)
|
|
||||||
- name: Activate Included Terraform Binary
|
- name: Activate Included Terraform Binary
|
||||||
run: |
|
run: |
|
||||||
mv ./terraform /usr/local/bin/terraform 2>/dev/null || cp ./terraform-binary /usr/local/bin/terraform 2>/dev/null || echo "Nutze bereits vorhandenes File"
|
mv ./terraform /usr/local/bin/terraform 2>/dev/null || echo "Nutze vorhandenes File"
|
||||||
chmod +x /usr/local/bin/terraform
|
chmod +x /usr/local/bin/terraform
|
||||||
terraform --version
|
terraform --version
|
||||||
|
|
||||||
|
# KORRIGIERT: Geht verschlüsselt über den Caddy-Proxy (Port 443 intern)
|
||||||
- name: Log in to Local Registry
|
- name: Log in to Local Registry
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login http://forgejo:3000 -u ${{ github.actor }} --password-stdin
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login caddy -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
|
||||||
|
|
||||||
|
# KORRIGIERT: Taggt das Image für den Caddy-Proxy
|
||||||
- name: Build App Image
|
- name: Build App Image
|
||||||
run: |
|
run: |
|
||||||
docker build -t forgejo:3000/${{ github.repository }}:${{ github.sha }} .
|
docker build -t caddy/${{ github.repository }}:${{ github.sha }} .
|
||||||
docker build -t forgejo:3000/${{ github.repository }}:latest .
|
docker build -t caddy/${{ github.repository }}:latest .
|
||||||
|
|
||||||
|
# KORRIGIERT: Pusht verschlüsselt über Caddy
|
||||||
- name: Push App Image
|
- name: Push App Image
|
||||||
run: |
|
run: |
|
||||||
docker push forgejo:3000/${{ github.repository }}:${{ github.sha }}
|
docker push caddy/${{ github.repository }}:${{ github.sha }}
|
||||||
docker push forgejo:3000/${{ github.repository }}:latest
|
docker push caddy/${{ github.repository }}:latest
|
||||||
|
|
||||||
- name: Terraform Deploy
|
- name: Terraform Deploy
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue