mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 01:26:59 +02:00
adds trivy for image scanning
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
parent
8cc952298c
commit
37b7e63d5c
29
.github/workflows/trivy.yml
vendored
Normal file
29
.github/workflows/trivy.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
name: trivy vulnerability scanner
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build an image from Dockerfile
|
||||
run: |
|
||||
make build.docker
|
||||
|
||||
- uses: cachix/install-nix-action@v13
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- uses: workflow/nix-shell-action@v1
|
||||
env:
|
||||
with:
|
||||
packages: trivy
|
||||
script: |
|
||||
make build.docker
|
||||
./scripts/run-trivy.sh
|
||||
|
3
scripts/run-trivy.sh
Executable file
3
scripts/run-trivy.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#! /bin/bash
|
||||
|
||||
trivy image --exit-code 1 us.gcr.io/k8s-artifacts-prod/external-dns/external-dns:$(git describe --tags --always --dirty)
|
Loading…
Reference in New Issue
Block a user