forked from AtomicJar/S123
-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (43 loc) · 1.31 KB
/
scout.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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