Skip to content

ci: pin to rust 1.70 #15

ci: pin to rust 1.70

ci: pin to rust 1.70 #15

name: Build and push container image
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
packages: write
# docker buildx to build and push multi-arch images
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64/v8
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- name: Lowercase repo name
id: repository
run: |
echo "LOWERCASE_REPO=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
- name: Build and push using docker Buildx
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/${{ steps.repository.outputs.LOWERCASE_REPO }}:${{ github.sha }},ghcr.io/${{ steps.repository.outputs.LOWERCASE_REPO }}:latest