diff --git a/.gitea/workflows/010_ci_docker_image.yaml b/.gitea/workflows/010_ci_docker_image.yaml index afbf93a..fc3de57 100644 --- a/.gitea/workflows/010_ci_docker_image.yaml +++ b/.gitea/workflows/010_ci_docker_image.yaml @@ -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 }} \ No newline at end of file