Skip to content

Use Trivy to scan images (#244) #36

Use Trivy to scan images (#244)

Use Trivy to scan images (#244) #36

---
name: Build and Push Docker Images
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out code
uses: actions/[email protected]
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.WRITE_PACKAGE_TOKEN }}
- name: Build and push run-detection Docker image
uses: docker/build-push-action@v5
with:
file: ./container/rundetection.D
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/rundetection:${{ github.sha }}