Skip to content

Commit

Permalink
tag update code
Browse files Browse the repository at this point in the history
  • Loading branch information
Aadesh619 committed Jan 6, 2024
1 parent 0a2ea9f commit c1d4aab
Showing 1 changed file with 35 additions and 23 deletions.
58 changes: 35 additions & 23 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,40 @@ jobs:
load: true

# Image Scan
- name: Scan for vulnerabilities with KSOC
if: always() # run this step always
uses: ksoclabs/image-scan-action@v0.0.4
with:
fail_on_severity: critical
image: welcome-app:${{ env.IMG_TAG }}
# - name: Scan for vulnerabilities with KSOC
# if: always() # run this step always
# uses: ksoclabs/image-scan-action@v0.0.4
# with:
# fail_on_severity: critical
# image: welcome-app:${{ env.IMG_TAG }}

- name: Scan for vulnerabilities with crazy-max
if: always() # run this step always
uses: crazy-max/ghaction-container-scan@v3
with:
image: welcome-app:${{ env.IMG_TAG }}
severity_threshold: HIGH
dockerfile: ./Dockerfile
# - name: Scan for vulnerabilities with crazy-max
# if: always() # run this step always
# uses: crazy-max/ghaction-container-scan@v3
# with:
# image: welcome-app:${{ env.IMG_TAG }}
# severity_threshold: HIGH
# dockerfile: ./Dockerfile

- name: Scan for vulnerabilities with Trivy
uses: aquasecurity/trivy-action@master
with:
image-ref: welcome-app:${{ env.IMG_TAG }}
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'

# - name: Scan for vulnerabilities with Trivy
# uses: aquasecurity/trivy-action@master
# with:
# image-ref: welcome-app:${{ env.IMG_TAG }}
# format: 'table'
# exit-code: '1'
# ignore-unfixed: true
# vuln-type: 'os,library'
# severity: 'CRITICAL,HIGH'

- name: Update image tag
run: |
git config --unset-all http.https://github.com/.extraheader
git clone git@github.com:Aadeshkale/kube-cd.git
https://Aadeshkale:${{ env.IMG_TAG }}@github.com/Aadeshkale/kube-cd
cd kube-cd
sed -i 's|image:.*|image: '${{ env.IMG_TAG }}'|' deployment.yaml
git add deployment.yaml
git commit -m "Tag updated by gitaction workflow"
git push

0 comments on commit c1d4aab

Please sign in to comment.