Skip to content

feat(Docker): add arm support #29

feat(Docker): add arm support

feat(Docker): add arm support #29

name: build and push image
on:
push:
tags:
- "*"
permissions:
contents: read
packages: write
jobs:
build-and-push-arm64:
runs-on: ubuntu-24.04-arm
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/arm64
push: true
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: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create and push manifest images
uses: lidofinance/docker-manifest-action@b33ab348026b120a895167160f5605b0197f0862
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