Skip to content

scout

scout #29

Workflow file for this run

name: scout
on:
workflow_run:
workflows: [dbc]
types:
- completed
env:
IMAGE_NAME: olegselajev241/todo-demo-application
SHA: ${{ github.sha}}
COMPARE_TAG: latest
jobs:
scout:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
labels: |
org.opencontainers.image.revision=${{ env.SHA }}
tags: |
type=sha,prefix=,suffix=,format=short
- name: Docker Scout
id: docker-scout
uses: docker/scout-action@v1
with:
organization: olegselajev241
command: policy
image: olegselajev241/todo-demo-application:${{ env.SHA }}
exit-on: policy
exit-code: true
write-comment: false