Fix registry hostname (duckdns) and Trivy github auth #4
@@ -33,7 +33,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0 # SonarQube wil de volledige git-historie zien
|
fetch-depth: 0 # SonarQube wil de volledige git-historie zien
|
||||||
- name: SonarQube scan
|
- name: SonarQube scan
|
||||||
uses: sonarsource/sonarqube-scan-action@v4
|
uses: sonarsource/sonarqube-scan-action@v6
|
||||||
env:
|
env:
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
|
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
|
||||||
@@ -47,23 +47,27 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
run: docker build -t gitea.zb.local/willem/glucose-dashboard:${{ gitea.sha }} .
|
run: docker build -t gitea.zb-kw.duckdns.org/willemjan/glucose-dashboard:${{ gitea.sha }} .
|
||||||
|
|
||||||
- name: Trivy scan
|
- name: Trivy scan
|
||||||
uses: aquasecurity/trivy-action@master
|
uses: aquasecurity/trivy-action@master
|
||||||
with:
|
with:
|
||||||
image-ref: gitea.zb.local/willem/glucose-dashboard:${{ gitea.sha }}
|
image-ref: gitea.zb-kw.duckdns.org/willemjan/glucose-dashboard:${{ gitea.sha }}
|
||||||
severity: CRITICAL,HIGH
|
severity: CRITICAL,HIGH
|
||||||
exit-code: "1" # laat de pipeline falen bij kritieke kwetsbaarheden
|
exit-code: "1" # laat de pipeline falen bij kritieke kwetsbaarheden
|
||||||
|
# gitea.token is geen geldig GitHub-token; leeg laten zodat setup-trivy
|
||||||
|
# de aquasecurity/trivy-repo anoniem kan clonen in plaats van een
|
||||||
|
# ongeldige Authorization-header naar github.com te sturen.
|
||||||
|
token-setup-trivy: ""
|
||||||
|
|
||||||
- name: Login bij Gitea-registry
|
- name: Login bij Gitea-registry
|
||||||
run: echo "${{ secrets.GLUCOSE_TOKEN }}" | docker login gitea.zb.local -u willem --password-stdin
|
run: echo "${{ secrets.GLUCOSE_TOKEN }}" | docker login gitea.zb-kw.duckdns.org -u willemjan --password-stdin
|
||||||
|
|
||||||
- name: Tag en push
|
- name: Tag en push
|
||||||
run: |
|
run: |
|
||||||
docker tag gitea.zb.local/willem/glucose-dashboard:${{ gitea.sha }} gitea.zb.local/willem/glucose-dashboard:latest
|
docker tag gitea.zb-kw.duckdns.org/willemjan/glucose-dashboard:${{ gitea.sha }} gitea.zb-kw.duckdns.org/willemjan/glucose-dashboard:latest
|
||||||
docker push gitea.zb.local/willem/glucose-dashboard:${{ gitea.sha }}
|
docker push gitea.zb-kw.duckdns.org/willemjan/glucose-dashboard:${{ gitea.sha }}
|
||||||
docker push gitea.zb.local/willem/glucose-dashboard:latest
|
docker push gitea.zb-kw.duckdns.org/willemjan/glucose-dashboard:latest
|
||||||
|
|
||||||
# ---------------------------------------------------------------------
|
# ---------------------------------------------------------------------
|
||||||
# 4. Deploy — SSH naar de LXC en herstart met de nieuwe image
|
# 4. Deploy — SSH naar de LXC en herstart met de nieuwe image
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
glucose-dashboard:
|
glucose-dashboard:
|
||||||
image: gitea.zb.local/willem/glucose-dashboard:latest
|
image: gitea.zb-kw.duckdns.org/willemjan/glucose-dashboard:latest
|
||||||
container_name: glucose-dashboard
|
container_name: glucose-dashboard
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
Reference in New Issue
Block a user