Add .gitea/workflows/*.yaml

This commit is contained in:
2025-10-18 20:32:35 -07:00
parent 17c32c00d3
commit 0ac7387f38

View File

@@ -103,19 +103,13 @@ jobs:
with:
name: image
path: /tmp
# Trivy CLI install (no Docker needed)
- name: Install Trivy CLI
run: |
set -euo pipefail
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh \
| sh -s -- -b /usr/local/bin v0.65.0
trivy --version
# IMPORTANT: the tar sits under /tmp/image.tar
- name: Scan saved image tar with Trivy (no daemon)
- name: Scan saved image tar with Trivy
run: |
ls -la /tmp || true
trivy image \
@@ -124,7 +118,6 @@ jobs:
--output /tmp/trivy-results.json \
--severity CRITICAL,HIGH \
--ignore-unfixed
- name: Upload results
uses: actions/upload-artifact@v3
with:
@@ -144,11 +137,10 @@ jobs:
run: |
docker load --input /tmp/image.tar
docker image ls -a
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Docker push image to DockerHub
- name: Login to Gitea Docker Registry
run: |
echo "${{ secrets.REGISTRY_TOKEN }}" | \
docker login gitea.cuihang1201.synology.me -u ${{ secrets.REGISTRY_USER }} --password-stdin
- name: Push Docker image
run: |
docker push ${{ vars.IMAGE }}:${{ inputs.image-tag }}