Skip to content

Commit

Permalink
Create scan.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rfuelsh committed Jan 29, 2024
1 parent 3fdd33d commit ed7d974
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Container Scan Test

on:
workflow_dispatch:
push:
branches:
- feature/ci-container-image-audit
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
release:
types: [published]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build-scan-docker-image:
runs-on: buildjet-4vcpu-ubuntu-2204
permissions:
contents: read
packages: write
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build and push the image to ghcr.io
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
file: deployment/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=ghcr.io/fuellabs/fuel-core-build-cache:latest
cache-to: type=registry,ref=ghcr.io/fuellabs/fuel-core-build-cache:latest,mode=max

- name: Scan Container Image
uses: crazy-max/ghaction-container-scan@v3
image: ${{ fromJSON(steps.meta.outputs.json).tags[0] }}

0 comments on commit ed7d974

Please sign in to comment.