fix registry hostname and load .env automatically
gitea.thuis.local doesn't resolve on this network; the real internal Gitea hostname is gitea.zb.local. Also load .env via python-dotenv so the app works the same under PowerShell as bash, and add .dockerignore so .env never ends up baked into the image. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
@@ -47,23 +47,23 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build Docker image
|
||||
run: docker build -t gitea.thuis.local/willem/glucose-dashboard:${{ gitea.sha }} .
|
||||
run: docker build -t gitea.zb.local/willem/glucose-dashboard:${{ gitea.sha }} .
|
||||
|
||||
- name: Trivy scan
|
||||
uses: aquasecurity/trivy-action@master
|
||||
with:
|
||||
image-ref: gitea.thuis.local/willem/glucose-dashboard:${{ gitea.sha }}
|
||||
image-ref: gitea.zb.local/willem/glucose-dashboard:${{ gitea.sha }}
|
||||
severity: CRITICAL,HIGH
|
||||
exit-code: "1" # laat de pipeline falen bij kritieke kwetsbaarheden
|
||||
|
||||
- name: Login bij Gitea-registry
|
||||
run: echo "${{ secrets.GLUCOSE_TOKEN }}" | docker login gitea.thuis.local -u willem --password-stdin
|
||||
run: echo "${{ secrets.GLUCOSE_TOKEN }}" | docker login gitea.zb.local -u willem --password-stdin
|
||||
|
||||
- name: Tag en push
|
||||
run: |
|
||||
docker tag gitea.thuis.local/willem/glucose-dashboard:${{ gitea.sha }} gitea.thuis.local/willem/glucose-dashboard:latest
|
||||
docker push gitea.thuis.local/willem/glucose-dashboard:${{ gitea.sha }}
|
||||
docker push gitea.thuis.local/willem/glucose-dashboard:latest
|
||||
docker tag gitea.zb.local/willem/glucose-dashboard:${{ gitea.sha }} gitea.zb.local/willem/glucose-dashboard:latest
|
||||
docker push gitea.zb.local/willem/glucose-dashboard:${{ gitea.sha }}
|
||||
docker push gitea.zb.local/willem/glucose-dashboard:latest
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# 4. Deploy — SSH naar de LXC en herstart met de nieuwe image
|
||||
|
||||
Reference in New Issue
Block a user