Skip to content

ci: Migration from ci-runner to matterlabs-ci-runner #2

ci: Migration from ci-runner to matterlabs-ci-runner

ci: Migration from ci-runner to matterlabs-ci-runner #2

name: publish zk-environment with cuda 12.0 docker image
on:
pull_request:
branches:
- main
types: [closed]
paths:
- "docker/zk-environment-cuda-12-0/Dockerfile"
- ".github/workflows/zk-environment-cuda-12-0.publish.yml"
workflow_dispatch:
branches:
- "main"
jobs:
push_to_registry:
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
name: Push Docker image to Docker Hub
runs-on: [matterlabs-ci-runner]
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
submodules: "recursive"
- name: Login to us-central1 GAR
run: |
gcloud auth print-access-token --lifetime=7200 --impersonate-service-account=gha-ci-runners@matterlabs-infra.iam.gserviceaccount.com | docker login -u oauth2accesstoken --password-stdin https://us-docker.pkg.dev
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: docker/zk-environment-cuda-12-0/Dockerfile
push: true
target: nvidia-tools
tags: |
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/zk-environment-cuda-12-0:latest
matterlabs/zk-environment:cuda-12-0-latest