Skip to content

Update build_and_push_image.yml #5

Update build_and_push_image.yml

Update build_and_push_image.yml #5

name: build and push image
on:
push:
tags:
- "*"
permissions:
contents: read
packages: write
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v6.1.0
with:
context: .
platforms: linux/amd64
push: true
tags: ghcr.io/lidofinance/scripts:${{ github.ref_name }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.28.0
with:
image-ref: 'ghcr.io/lidofinance/scripts:${{ github.ref_name }}'
format: 'table'
exit-code: '0'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'