Skip to content

Commit

Permalink
Update build_and_push_image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
iamnp authored Feb 25, 2025
1 parent edc6ed4 commit 4dae499
Showing 1 changed file with 41 additions and 2 deletions.
43 changes: 41 additions & 2 deletions .github/workflows/build_and_push_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:
packages: write

jobs:
docker:
build-and-push-arm64:
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout
Expand All @@ -29,7 +29,46 @@ jobs:
context: .
platforms: linux/arm64
push: true
tags: ghcr.io/lidofinance/scripts:${{ github.ref_name }}
tags: ghcr.io/lidofinance/scripts:${{ github.ref_name }}-arm64

build-and-push-amd64:
runs-on: ubuntu-24.04
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 }}-amd64

docker-manifest:
runs-on: ubuntu-24.04
needs: [build-and-push-arm64, build-and-push-amd64]
steps:
- name: Create and push manifest images
uses: Noelware/docker-manifest-action@master
with:
inputs: ghcr.io/lidofinance/scripts:${{ github.ref_name }}
images: ghcr.io/lidofinance/scripts:${{ github.ref_name }}-amd64,ghcr.io/lidofinance/scripts:${{ github.ref_name }}-arm64
push: true

run-trivy:
needs: docker-manifest
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.28.0
Expand Down

0 comments on commit 4dae499

Please sign in to comment.