Skip to content

chore: Update Health Check Endpoints for Liveness and Readiness (#263) #85

chore: Update Health Check Endpoints for Liveness and Readiness (#263)

chore: Update Health Check Endpoints for Liveness and Readiness (#263) #85

name: Build and Publish linea-ccip-gateway
on:
push:
branches:
- main
paths:
- "packages/linea-ccip-gateway/**"
pull_request:
branches:
- main
paths:
- "packages/linea-ccip-gateway/**"
release:
types:
- released
jobs:
linea-ccip-gateway-build-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
packages/linea-ccip-gateway
packages/linea-state-verifier
pnpm-workspace.yaml
pnpm-lock.yaml
sparse-checkout-cone-mode: false
- name: Set Docker Tag Testnet
id: docker-tag-testnet
if: ${{ github.event_name != 'release' }}
run: echo "DOCKER_TAG_TESTNET=${GITHUB_SHA:0:7}-$(date +%s)-linea-ccip-gateway-testnet" | tee $GITHUB_ENV
- name: Set Docker Tag Mainnet
id: docker-tag-mainnet
if: ${{ github.event_name != 'release' }}
run: echo "DOCKER_TAG_MAINNET=${GITHUB_SHA:0:7}-$(date +%s)-linea-ccip-gateway-mainnet" | tee $GITHUB_ENV
- name: Set Docker Tag Testnet - Release
id: docker-tag-testnet-release
if: ${{ github.event_name == 'release' }}
run: echo "DOCKER_TAG_TESTNET=${GITHUB_SHA:0:7}-$(date +%s)-linea-ccip-gateway-testnet-${GITHUB_REF#refs/tags/}" | tee $GITHUB_ENV
- name: Set Docker Tag Mainnet - Release
id: docker-tag-mainnet-release
if: ${{ github.event_name == 'release' }}
run: echo "DOCKER_TAG_MAINNET=${GITHUB_SHA:0:7}-$(date +%s)-linea-ccip-gateway-mainnet-${GITHUB_REF#refs/tags/}" | tee $GITHUB_ENV
- name: Login to Docker Repository
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_REPO_USER }}
password: ${{ secrets.DOCKER_REPO_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker Image Build and Publish Testnet
uses: docker/build-push-action@v4
with:
build-args: |
L1_PROVIDER_URL=https://sepolia.infura.io/v3/${{ secrets.NEXT_PUBLIC_INFURA_KEY }}
L2_PROVIDER_URL=https://linea-sepolia.infura.io/v3/${{ secrets.NEXT_PUBLIC_INFURA_KEY }}
L1_ROLLUP_ADDRESS=${{ vars.L1_TESTNET_ROLLUP_ADDRESS }}
L2_CHAIN_ID=${{ vars.L2_TESTNET_CHAIN_ID }}
NODE_ENV=${{ vars.CCIP_GATEWAY_TESTNET_NODE_ENV }}
file: ./packages/linea-ccip-gateway/Dockerfile
context: ./
push: true
tags: consensys/linea-resolver:${{ env.DOCKER_TAG_TESTNET }}
- name: Docker Image Build and Publish Mainnet
uses: docker/build-push-action@v4
with:
build-args: |
L1_PROVIDER_URL=https://mainnet.infura.io/v3/${{ secrets.NEXT_PUBLIC_INFURA_KEY }}
L2_PROVIDER_URL=https://linea-mainnet.infura.io/v3/${{ secrets.NEXT_PUBLIC_INFURA_KEY }}
L1_ROLLUP_ADDRESS=${{ vars.L1_MAINNET_ROLLUP_ADDRESS }}
L2_CHAIN_ID=${{ vars.L2_MAINNET_CHAIN_ID }}
NODE_ENV=${{ vars.CCIP_GATEWAY_MAINNET_NODE_ENV }}
file: ./packages/linea-ccip-gateway/Dockerfile
context: ./
push: true
tags: consensys/linea-resolver:${{ env.DOCKER_TAG_MAINNET }}