Skip to content

feat: add tokenId and token to crosschainPayloads (#275) #179

feat: add tokenId and token to crosschainPayloads (#275)

feat: add tokenId and token to crosschainPayloads (#275) #179

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- main
paths:
- src/**
- scripts/**
- Dockerfile
release:
types: [published, created] # Add 'created' to trigger on release creation
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f
- name: Log in to Container Registry
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,prefix=sha-
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=main,enable={{is_default_branch}}
flavor: |
latest=auto
labels: |
org.opencontainers.image.title={{repo}}
org.opencontainers.image.description={{description}}
org.opencontainers.image.vendor={{vendor}}
org.opencontainers.image.version={{version}}
org.opencontainers.image.revision={{sha}}
org.opencontainers.image.created={{created}}
- name: Build and push Docker image
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max