Skip to content

Commit

Permalink
update log collect
Browse files Browse the repository at this point in the history
Signed-off-by: chensuyue <[email protected]>
  • Loading branch information
chensuyue committed Aug 30, 2024
1 parent 1c80df1 commit 7d554dd
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/manual-docker-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,30 @@ jobs:
if: always()
run: docker rmi -f ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }} || true

- name: Collect Logs
if: always()
run: |
mkdir -p /tmp/scan-${{ inputs.tag }}-${GITHUB_RUN_NUMBER}
mv ${{ matrix.image }}-*-scan.txt /tmp/scan-${{ inputs.tag }}-${GITHUB_RUN_NUMBER}
upload-artifacts:
needs: scan-docker
runs-on: "docker-build-${{ inputs.node }}"
steps:
- uses: actions/[email protected]
if: always()
with:
name: sbom-scan-${GITHUB_RUN_ID}
path: ${{ matrix.image }}-sbom-scan.txt
overwrite: false
name: sbom-scan-${{ inputs.tag }}-${GITHUB_RUN_NUMBER}
path: /tmp/scan-${{ inputs.tag }}-${GITHUB_RUN_NUMBER}/*-sbom-scan.txt
overwrite: true

- uses: actions/[email protected]
if: always()
with:
name: trivy-scan-${GITHUB_RUN_ID}
path: ${{ matrix.image }}-trivy-scan.txt
overwrite: false
name: trivy-scan-${{ inputs.tag }}-${GITHUB_RUN_NUMBER}
path: /tmp/scan-${{ inputs.tag }}-${GITHUB_RUN_NUMBER}/*-trivy-scan.txt
overwrite: true

- name: Remove Logs
if: always()
run: rm -rf /tmp/scan-${{ inputs.tag }}-${GITHUB_RUN_NUMBER}

0 comments on commit 7d554dd

Please sign in to comment.