Add .gitea/workflows/*.yaml

This commit is contained in:
2025-10-18 14:35:09 -07:00
parent eb777c2486
commit 3abaedccf5

View File

@@ -93,6 +93,32 @@ jobs:
curl -s "http://${{ vars.LOCALHOST }}:8143/" ; echo curl -s "http://${{ vars.LOCALHOST }}:8143/" ; echo
echo "Stop container: " echo "Stop container: "
docker container stop ${{ inputs.container-name }} docker container stop ${{ inputs.container-name }}
vulnerability-scan:
runs-on: ubuntu-22.04
needs: [build-image]
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: image
path: /tmp
- name: Load image
run: |
docker load --input /tmp/image.tar
docker image ls -a
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ inputs.container-name }}:${{ inputs.image-tag }}
format: 'json'
output: 'trivy-results.json'
severity: 'CRITICAL,HIGH'
- name: Upload results
uses: actions/upload-artifact@v3
with:
name: trivy-results
path: ${{ github.workspace }}/trivy-results.json
publish-image: publish-image:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04