1313 workflow_dispatch :
1414
1515jobs :
16- build_push_and_check :
16+ build_push_check :
1717 name : Build docker image, publish it and run vuln scanner against it
1818 permissions :
1919 contents : read # for actions/checkout to fetch code
@@ -22,16 +22,20 @@ jobs:
2222 runs-on : ubuntu-latest
2323 steps :
2424 - name : Checkout repository
25- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1
25+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7
2626 - name : Set up Docker Buildx
2727 id : buildx
28- uses : docker/setup-buildx-action@f03ac48505955848960e80bbb68046aa35c7b9e7 # 2.4 .1
28+ uses : docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # 3.6 .1
2929 - name : Login to ghcr.io
30- uses : docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # 2.1 .0
30+ uses : docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # 3.3 .0
3131 with :
3232 registry : ghcr.io
3333 username : ${{ github.actor }}
3434 password : ${{ secrets.GITHUB_TOKEN }}
35+ - name : Free Disk Space (Ubuntu) # Reclaim disk space for build
36+ uses : jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
37+ with :
38+ docker-images : false # Do not remove locally built images (including trivy scanner)
3539 - name : Build images
3640 id : build
3741 run : ./build
@@ -41,33 +45,28 @@ jobs:
4145 run : ./build --describe >> $GITHUB_STEP_SUMMARY
4246 - name : Push images
4347 run : ./build --push
44- - name : Free Disk Space (Ubuntu) # Required by trivy to have enough space to scan full image
45- uses : jlumbroso/free-disk-space@76866dbe54312617f00798d1762df7f43def6e5c # v1.2.0
46- with :
47- large-packages : false # Temporary fix for https://github.com/jlumbroso/free-disk-space/issues/4
4848 - name : Run Trivy vulnerability scanner
49- uses : aquasecurity/trivy-action@41f05d9ecffa2ed3f1580af306000f734b733e54 # v0.11.2
49+ uses : aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # v0.24.0
5050 with :
5151 image-ref : ' ${{ steps.build.outputs.LATEST_IMAGE_TAG }}'
5252 format : ' sarif'
5353 output : ' trivy-results.sarif'
5454 severity : ' CRITICAL,HIGH'
5555 limit-severities-for-sarif : true
5656 - name : Upload Trivy scan results to GitHub Security tab
57- uses : github/codeql-action/upload-sarif@v2
57+ uses : github/codeql-action/upload-sarif@v3
5858 with :
5959 sarif_file : ' trivy-results.sarif'
60+
6061 keepalive-job :
6162 name : Keep repository alive to prevent workflows to be disabled
6263 if : ${{ always() }}
63- needs : build_push_and_check
64+ needs : build_push_check
6465 permissions :
65- actions : write
66+ actions : write # for gautamkrishnar/keepalive-workflow to keep the workflow alive
6667 runs-on : ubuntu-latest
6768 steps :
6869 - name : Checkout repository
69- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # 4.1.1
70+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7
7071 - name : Keep workflow alive
71- uses : gautamkrishnar/keepalive-workflow@306efe4fc63923e36571682b4f4b3e3eee8b6625 # v1.2.6
72- with :
73- use_api : true
72+ uses : gautamkrishnar/keepalive-workflow@24ba73b43d5ea8d2b3d56fb9b8de951ba9a3dd18 # v2.0.6
0 commit comments