Skip to content

Commit 293d9fe

Browse files
author
Sam Morris
committed
add scout job
1 parent 855ee66 commit 293d9fe

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/build-and-push.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212

1313
env:
1414
IMAGE_NAME: samanthamorris684/catbot
15+
# Change this from latest
16+
COMPARE_TAG: latest
1517
USERNAME: ${{ vars.DOCKERHUB_USERNAME }}
1618
PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
1719

@@ -33,6 +35,18 @@ jobs:
3335
docker build -t $IMAGE_NAME:${{ inputs.IMAGE_TAG }} .
3436
docker push $IMAGE_NAME:${{ inputs.IMAGE_TAG }}
3537
38+
- name: Docker Scout
39+
id: docker-scout
40+
if: ${{ github.event_name == 'pull_request' }}
41+
uses: docker/scout-action@v1
42+
with:
43+
command: compare
44+
image: $IMAGE_NAME:${{ inputs.IMAGE_TAG }}
45+
to: ${{ env.IMAGE_NAME }}:${{ env.COMPARE_TAG }}
46+
ignore-unchanged: true
47+
only-severities: critical,high
48+
write-comment: true
49+
github-token: ${{ secrets.GITHUB_TOKEN }} # to be able to write the comment
3650

3751

3852

0 commit comments

Comments
 (0)