Skip to content

refactor(blockifier): rename contract class to runnable contract class #2628

refactor(blockifier): rename contract class to runnable contract class

refactor(blockifier): rename contract class to runnable contract class #2628

name: Papyrus-Docker-Publish
on:
workflow_dispatch:
push:
branches: [main]
tags: ["v*.*.*"]
paths:
- '.github/workflows/papyrus_docker-publish.yml'
- 'crates/papyrus**/**'
- 'scripts/dependencies.sh'
pull_request:
paths:
- '.github/workflows/papyrus_docker-publish.yml'
- 'crates/papyrus**/**'
- 'scripts/dependencies.sh'
# On PR events, cancel existing CI runs on this same PR for this workflow.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.job }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
REGISTRY: ghcr.io
REPO_NAME: ${{ github.repository }}
jobs:
docker-build-push:
runs-on: starkware-ubuntu-latest-large
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Not required but recommended - enables build multi-platform images, export cache, etc
# Also workaround for: https://github.com/docker/build-push-action/issues/461
# https://github.com/docker/setup-buildx-action
- name: Setup Docker buildx
uses: docker/[email protected]
# Login to a Docker registry except on PR
# https://github.com/docker/login-action
- name: Login to registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
logout: true
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.REPO_NAME }}/papyrus
tags: |
type=semver,pattern={{raw}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=ref,event=pr
# set `dev` tag for the default branch (`main`).
type=raw,value=dev,enable={{is_default_branch}}
type=raw,value={{branch}}{{tag}}-{{sha}},enable=${{ github.event_name == 'workflow_dispatch' }}
# Build and push Docker image with Buildx
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max