Skip to content

Commit

Permalink
fix scout!
Browse files Browse the repository at this point in the history
  • Loading branch information
shelajev committed Sep 24, 2024
1 parent a872636 commit aed5e9d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/dbc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
tags: "olegselajev241/todo-demo-application:latest"
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/todo-demo-application:latest
${{ secrets.DOCKERHUB_USERNAME }}/todo-demo-application:${{ env.SHA }}
# For pull requests, export results to the build cache.
# Otherwise, push to a registry.
outputs: ${{ github.event_name == 'pull_request' && 'type=cacheonly' || 'type=registry,push=true' }}
outputs: 'type=registry,push=true'

15 changes: 5 additions & 10 deletions .github/workflows/scout.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker
name: scout

on:
workflow_run:
Expand All @@ -7,11 +7,8 @@ on:
- completed

env:
# Use docker.io for Docker Hub if empty
REGISTRY: docker.io
IMAGE_NAME: olegselajev241/todo-demo-application
SHA: ${{ github.event.pull_request.head.sha || github.event.after }}
# Use `latest` as the tag to compare to if empty, assuming that it's already pushed
COMPARE_TAG: latest

jobs:
Expand All @@ -22,12 +19,11 @@ jobs:

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2.1.0
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
Expand All @@ -45,10 +41,9 @@ jobs:
- name: Docker Scout
id: docker-scout
if: ${{ github.event_name == 'pull_request' }}
uses: docker/scout-action@v1
with:
command: quickview
image: olegselajev241/todo-demo-application:latest
image: olegselajev241/todo-demo-application:${{ env.SHA }}
only-severities: critical,high
write-comment: false

0 comments on commit aed5e9d

Please sign in to comment.