Skip to content

Commit

Permalink
added Docker Scout step
Browse files Browse the repository at this point in the history
  • Loading branch information
sinadarbouy committed Jun 7, 2024
1 parent 7b42cf5 commit 1da8068
Showing 1 changed file with 43 additions and 28 deletions.
71 changes: 43 additions & 28 deletions .github/workflows/docker_scout.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,54 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: "1.22"
cache: true
- name: Install nfpm for building Linux packages
run: go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest
- name: Build and release binaries
run: make build-release
- name: Build and release Linux packages
run: make build-linux-packages
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# - name: Set up Go 1.22
# uses: actions/setup-go@v5
# with:
# go-version: "1.22"
# cache: true
# - name: Install nfpm for building Linux packages
# run: go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest
# - name: Build and release binaries
# run: make build-release
# - name: Build and release Linux packages
# run: make build-linux-packages
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Sign in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
gatewaydio/gatewayd
ghcr.io/gatewayd-io/gatewayd
# - name: Sign in to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Extract metadata
# id: meta
# uses: docker/metadata-action@v5
# with:
# images: |
# gatewaydio/gatewayd
# ghcr.io/gatewayd-io/gatewayd
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: .
sbom: true
provenance: mode=max
load: true
tags: "ghcr.io/sinadarbouy/gatewayd:test"
- name: Authenticate to Docker
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PAT }}
- name: Docker Scout
id: docker-scout
# if: ${{ github.event_name == 'pull_request' }}
uses: docker/scout-action@v1
with:
command: compare
image: "gatewaydio/gatewayd:latest"
to: "ghcr.io/sinadarbouy/gatewayd:test"
ignore-unchanged: true
only-severities: critical,high
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1da8068

Please sign in to comment.