Skip to content

Workflow file for this run

name: Build and push ton-relayer server to Docker Hub
on:
workflow_dispatch:
branches:
- master
- staging
push:
tags:
- "v*"
- "v*-beta"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
docker-amd:
strategy:
matrix:
node: ["18.18.0"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
oraichain/defi_ton-bridge-relayer
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,enable=true,priority=100,prefix=,suffix=,format=short
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
build-args: |
GIT_COMMIT=${{ env.GIT_COMMIT }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
context: .
cache-from: type=registry,ref=oraichain/defi_ton-bridge-relayer:buildcache
cache-to: type=registry,ref=oraichain/defi_ton-bridge-relayer:buildcache,mode=max
platforms: linux/amd64