Skip to content

Commit

Permalink
test CI for dockerscout
Browse files Browse the repository at this point in the history
  • Loading branch information
fdewas-aneo committed Apr 4, 2024
1 parent 30826d9 commit c7d928b
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
faust1/angular-testings
tags: |
latest
type=ref,event=pr
type=edge,branch=main
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Docker Scout
uses: docker/scout-action@v1
with:
command: cves, recommendations
image: faust1/angular-testings:${{ steps.meta.outputs.tags }}
write-comment: false
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit c7d928b

Please sign in to comment.