Skip to content

ci: Fixed problem with evm release build (#812) #2

ci: Fixed problem with evm release build (#812)

ci: Fixed problem with evm release build (#812) #2

Workflow file for this run

name: Release
## workflow will trigger on below condition,
## except image release that have jobs condition to trigger only on tagging
on:
workflow_dispatch:
push:
tags:
- 'evm/v*.*.*'
defaults:
run:
shell: bash
env:
REGISTRY: ghcr.io
IMAGE_NAME_PREFIX: ${{ github.repository }}
jobs:
build-evm:
name: Docker Image (EVM)
if: startsWith(github.ref, 'refs/tags/evm/v')
runs-on: namespace-profile-linux-8vcpu-16gb-cached
# Add "id-token" with the intended permissions.
permissions:
contents: read
id-token: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install and configure Namespace CLI
uses: namespacelabs/nscloud-setup@v0
- name: Configure Namespace powered Buildx
uses: namespacelabs/nscloud-setup-buildx-action@v0
- name: Docker - Auth to Github Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract semver from tag
id: semver
run: |
echo "tag=$(echo ${GITHUB_REF#refs/tags/evm/})" >> $GITHUB_OUTPUT
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_PREFIX }}-evm
tags: |
type=semver,pattern={{version}},value=${{ steps.semver.outputs.tag }}
type=semver,pattern={{major}}.{{minor}},value=${{ steps.semver.outputs.tag }}
type=sha
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./evm/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}