Skip to content

chore(main): release 0.1.58 (#244) #91

chore(main): release 0.1.58 (#244)

chore(main): release 0.1.58 (#244) #91

name: Build and publish era-withdrawal-finalizer image
on:
push:
tags:
- v*
jobs:
push_to_registry:
name: Build and push docker image
runs-on: [matterlabs-ci-runner]
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- name: Set up Docker Build
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Generate build ID for Flux Image Automation
id: tag
if: ${{ startsWith(github.ref, 'refs/tags') }}
run: |
echo "::set-output name=BUILD_ID::${GITHUB_REF#refs/*/}"
- name: Generate build ID for Flux Image Automation
id: build
if: ${{ !startsWith(github.ref, 'refs/tags') }}
run: |
sha=$(git rev-parse --short HEAD)
ts=$(date +%s%N | cut -b1-13)
echo "::set-output name=BUILD_ID::${sha}-${ts}"
- name: Auth to google artifact registry
run: |
gcloud auth configure-docker us-docker.pkg.dev -q
- name: Build and push Docker image
uses: docker/[email protected]
if: ${{ startsWith(github.ref, 'refs/tags') }}
with:
push: true
tags: |
"us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/era-withdrawal-finalizer:latest"
"us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/era-withdrawal-finalizer:${{ steps.tag.outputs.BUILD_ID }}"
file: Dockerfile
no-cache: true