[DO NOT MERGE] release 0.21.0 (#1708) #568
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and push image for iris-mpc-cpu | |
on: | |
push: | |
branches: | |
- main | |
release: | |
types: | |
- 'published' | |
concurrency: | |
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: "${{ github.repository }}-cpu" | |
jobs: | |
docker: | |
timeout-minutes: 40 | |
runs-on: | |
labels: ubuntu-22.04-16core | |
permissions: | |
packages: write | |
contents: read | |
attestations: write | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 | |
- name: Log in to the Container registry | |
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@49f33fe638c0cba4fb16037a27915a7ab7740259 | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE }} | |
aws-region: eu-central-1 | |
- name: Login to Amazon ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 | |
- name: Build and Push | |
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 | |
with: | |
context: . | |
push: true | |
tags: | | |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} | |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | |
${{ secrets.AWS_ECR_IRIS_MPC_CPU }}:${{ github.sha }} | |
${{ secrets.AWS_ECR_IRIS_MPC_CPU }}:latest | |
${{ github.event.release.tag_name && format('{0}/{1}:{2}', env.REGISTRY, env.IMAGE_NAME, github.event.release.tag_name) || '' }} | |
${{ github.event.release.tag_name && format('{0}:{1}', secrets.AWS_ECR_IRIS_MPC_CPU, github.event.release.tag_name) || '' }} | |
platforms: linux/amd64 | |
build-args: | | |
ARCHITECTURE=x86_64 | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
file: Dockerfile.hawk |