Skip to content

Fix arm64 images

Fix arm64 images #28

on:
release:
types: [published]
env:
IMAGE_NAME: prenaissance/pricing-tf-processing
TARGET_PLAFORMS: linux/amd64,linux/arm64
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get the version
id: get_version
run: |
echo "Version from release: ${{ github.event.release.tag_name }}"
# Extract the major, major.minor, and full version, excluding the 'v' prefix
echo "MAJOR_VERSION=$(echo ${{ github.event.release.tag_name }} | cut -d. -f1 | sed 's/v//')" >> $GITHUB_OUTPUT
echo "MAJOR_MINOR_VERSION=$(echo ${{ github.event.release.tag_name }} | cut -d. -f1-2 | sed 's/v//')" >> $GITHUB_OUTPUT
echo "VERSION=$(echo ${{ github.event.release.tag_name }} | sed 's/v//')" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: prenaissance
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./src/processing/Dockerfile
push: true
platforms: ${{ env.TARGET_PLAFORMS }}
tags: |
${{ env.IMAGE_NAME }}:${{ steps.get_version.outputs.VERSION }}
${{ env.IMAGE_NAME }}:${{ steps.get_version.outputs.MAJOR_MINOR_VERSION }}
${{ env.IMAGE_NAME }}:${{ steps.get_version.outputs.MAJOR_VERSION }}
${{ env.IMAGE_NAME }}:latest