-
Notifications
You must be signed in to change notification settings - Fork 15
83 lines (74 loc) · 3.08 KB
/
linea-ccip-gateway-build-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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 }}
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 }}
file: ./packages/linea-ccip-gateway/Dockerfile
context: ./
push: true
tags: consensys/linea-resolver:${{ env.DOCKER_TAG_MAINNET }}