Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge from relayer #169

Draft
wants to merge 162 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
162 commits
Select commit Hold shift + click to select a range
15317d7
Flush query should include begin and end block events (#1125)
agouin Mar 20, 2023
665ab90
pre_init messages (#1131)
agouin Mar 20, 2023
f0f977d
fix default coin type (#1134)
agouin Mar 22, 2023
1cd441e
build: bump to Go 1.20 + bump deps (#1132)
jtieri Mar 23, 2023
0af487e
Fix flushing acks (#1139)
agouin Mar 23, 2023
14b03e5
Fix ordered channel closure (#1142)
agouin Mar 24, 2023
1206b44
Fix flush termination condition (#1141)
agouin Mar 24, 2023
88acf21
bump to main sha (#1143)
agouin Mar 24, 2023
048dfa4
Pre-filter flush channels (#1146)
agouin Mar 27, 2023
f29a2c7
Add channel close correlation (#1145)
agouin Mar 27, 2023
dcc6060
Fix flush on ordered channels (#1150)
agouin Mar 27, 2023
9c7e897
Now that we have periodic flushing, skip blocks if they can't be quer…
agouin Mar 29, 2023
8dcf4c1
Lock config file for all write operations (#1156)
agouin Mar 31, 2023
c687408
Penumbra support v2 (#1144)
hdevalence Mar 31, 2023
d57648a
--time-threshold example use cases (#1155)
boojamya Apr 3, 2023
d7219fc
Make ICA waits more explicit (#1157)
agouin Apr 4, 2023
deab34e
Bump github.com/docker/docker in /interchaintest (#1160)
dependabot[bot] Apr 4, 2023
2cf2952
bump version in docs (#1158)
agouin Apr 4, 2023
f9aaf3d
Bump github.com/opencontainers/runc in /interchaintest (#1153)
dependabot[bot] Apr 5, 2023
d619c89
Fix QueryConnectionsUsingClient for cosmos (#1162)
agouin Apr 6, 2023
ba8f442
Make min query loop duration configurable (#1164)
agouin Apr 7, 2023
26aa346
penumbra provider: update generated protos (#1168)
avahowell Apr 11, 2023
deef5eb
Add sr25519 support (#1120)
agouin Apr 11, 2023
314056b
penumbra: update protos (#1170)
conorsch Apr 14, 2023
e594d2a
chore: add path name to logs in message processor (#1171)
jtieri Apr 18, 2023
4aa0d3c
Fix multiple conn open init (#1173)
agouin Apr 18, 2023
591c136
allow register with extra_codecs (#1175)
mmsqe Apr 21, 2023
3a14f8c
Harry/fee middleware (#1174)
Cosmos-Harry Apr 25, 2023
1ee79e5
fix: nil receiver initiate for path (#1177)
mmsqe Apr 26, 2023
d36dd5d
feat: add max-gas-amount parameter in chain configs (#1178)
mmsqe May 2, 2023
04e7f3a
dep: bump sdk from v0.47.0 to v0.47.2 (#1180)
mmsqe May 3, 2023
45f478b
Harry/rly tx channel (#1183)
Cosmos-Harry May 12, 2023
af8d0f7
Harry/rly tx transfer (#1184)
Cosmos-Harry May 18, 2023
d5e3882
Better Error Messaging when failing to query the Block Height (#1189)
keefertaylor May 18, 2023
debdee7
penumbra: update protos (#1181)
conorsch May 19, 2023
23d1e5c
Neutron launch fixes and optimizations (#1185)
agouin May 24, 2023
736e48b
Problem: fixes in ibc-go v7.0.1 are not included (#1205)
mmsqe May 31, 2023
de95076
Harry/rly address (#1204)
Cosmos-Harry Jun 1, 2023
e95dd80
deps: update to ibc-go v7.1.0-rc0 (#1207)
jtieri Jun 7, 2023
0981e67
Export wallet address for Prometheus metrics (#1206)
boojamya Jun 8, 2023
4ec767a
chore: replace gogo/protobuf to cosmos/gogoproto (#1208)
mmsqe Jun 28, 2023
049b5b4
feat: add extension_options parameter in chain configs (#1179)
mmsqe Jun 29, 2023
b4653dd
feat: support localhost ibc (#1191)
jtieri Jun 29, 2023
253a641
dep: bump cometbft and ibc-go (#1221)
mmsqe Jul 5, 2023
d0a4010
add missing stop relayer to avoid log after test complete (#1229)
mmsqe Jul 5, 2023
ea035d5
fix: avoid invalid Bech32 prefix in scenario test (#1226)
mmsqe Jul 6, 2023
1bfe06c
wait more blks for ack (#1222)
mmsqe Jul 6, 2023
91f9105
penumbra provider: update proof spec (#1232)
avahowell Jul 7, 2023
4a3237d
fix: flag accessed but not defined: flush-interval (#1238)
mindcarver Jul 12, 2023
af73416
penumbra provider: update protos (#1245)
avahowell Jul 22, 2023
73d338a
fix: Suppressing scary SDK error on redundant packets (#1214)
joeabbey Jul 22, 2023
7ae1596
catch error if type is missing (#1234)
murataniloener Jul 25, 2023
22bce42
Export client expiration metric to prometheus (#1235)
boojamya Jul 25, 2023
55084bd
Export configured gas prices to prometheus wallet balance metric (#1236)
boojamya Jul 25, 2023
107d3f5
Exports block query errors to prometheus metrics (counter) (#1239)
boojamya Jul 25, 2023
3c78287
Export TX failures to prometheus metrics (counter) (#1240)
boojamya Jul 25, 2023
993c21b
use the name given by the user to generate the fetch URL (#1233)
murataniloener Jul 26, 2023
cdd7661
feegrant PR (#1140)
KyleMoser Jul 27, 2023
5236f6f
Export Client Trusting Period to Prometheus metrics (#1246)
boojamya Jul 27, 2023
f054ac4
separate feegrant test to avoid no space left on device (#1250)
mmsqe Jul 29, 2023
1301e1d
Add extra client info when querying client expiration (#1247)
boojamya Jul 29, 2023
ab1c4fc
next seq ack handling (#1244)
agouin Jul 31, 2023
d878a55
chore: update penumbra protos to v0.57.0 (#1249)
conorsch Jul 31, 2023
2138221
fix: reduce get bech32 prefix when get signer (#1231)
mmsqe Aug 1, 2023
a63cd79
update setup-go action (#1251)
boojamya Aug 2, 2023
4598b0e
fix for feegrants (#1256)
KyleMoser Aug 15, 2023
811004c
chore: update penumbra protos (#1260)
conorsch Aug 15, 2023
b7e185e
Change 2.3.0 to 2.4.0 (#1253)
Sr20dem Aug 16, 2023
3415e6a
rename path to path_name for consistency (#1262)
danbryan Aug 17, 2023
c3f07c6
Use unique names for relayer images & cleanup when purpose served (#1…
vimystic Aug 29, 2023
dcd6d37
use ibc-go capability module (#1277)
faddat Sep 1, 2023
2fadd37
fix: use resp.Events to parse events instead of logs (#1271)
colin-axner Sep 5, 2023
7b073b3
working correctly with 7.3 and 0.47.5 (#1280)
faddat Sep 6, 2023
a3bd5b0
chore: icon module setup
viveksharmapoudel Feb 16, 2023
62433ea
chore: icon module required interface setup
viveksharmapoudel Feb 17, 2023
77b9039
chore: refractor required icon module interface to implement
viveksharmapoudel Feb 20, 2023
6fa7cbf
chore: icon client rpc implemnation
viveksharmapoudel Feb 20, 2023
34aa62b
feat: Add BTP info in icon client
izyak Feb 20, 2023
6be91d6
chore: define types.go
izyak Feb 20, 2023
aaf293f
feat: Parse a SendPacket event
izyak Feb 21, 2023
b454a65
feat: Use *zap.Logger
Feb 27, 2023
dfcee22
feat: Event Parser
Feb 27, 2023
e243a39
client test
viveksharmapoudel Feb 27, 2023
0abc168
feat: icon querier initiate
viveksharmapoudel Feb 27, 2023
8f7364a
feat: Keystore added to icon client (#3)
izyak Mar 13, 2023
1e0d3c8
Feat/iibc 44 icon chain provider (#9)
izyak Mar 15, 2023
3cdee0d
Feat/icon-chain-processor (#10)
viveksharmapoudel Mar 15, 2023
b68e059
feat: Parse event of bytes format
Mar 16, 2023
e2c0406
fix: Order of Height
Mar 16, 2023
b69e259
fix: renaming imports after old commit cherry-pick
viveksharmapoudel Mar 17, 2023
9a3aa0e
Icon Message Handler (#38)
viveksharmapoudel Mar 28, 2023
f10fab3
fix: minor (#45)
viveksharmapoudel Apr 4, 2023
0ef77e1
Feat/icon channel connection method impl (#39)
izyak Apr 17, 2023
d1d956f
chore: import icon types from ibc-integration (#47)
viveksharmapoudel Apr 17, 2023
6ae6318
chore: refractor codec implementation (#49)
viveksharmapoudel Apr 17, 2023
3657449
Feat: Packet Acknowledgement Transaction (#50)
izyak Apr 18, 2023
5f33102
Update provider config after successful handshake (#51)
viveksharmapoudel Apr 18, 2023
76f2c72
feature/ archway module setup (#57)
viveksharmapoudel Apr 20, 2023
e4e0623
feat: Add icon proofs (#56)
izyak Apr 24, 2023
ce504e9
ci: setup codecov and pr-lint (#60)
DeepakBomjan Apr 27, 2023
230e3bf
feat: archway keyring implementation (#62)
viveksharmapoudel May 3, 2023
8d72899
feat: Archway event parser (#63)
viveksharmapoudel May 4, 2023
47aec8b
feat: archway chain processor (#64)
viveksharmapoudel May 4, 2023
701eed4
feat: Archway provider client (#65)
izyak May 4, 2023
7bf3679
feat: Query methods for archway (#67)
izyak May 5, 2023
43ed589
feat: Transaction methods (#68)
izyak May 14, 2023
b5dd9b8
feat: Implement update client feature of icon module with reference t…
viveksharmapoudel May 15, 2023
a23c98e
feat: archway proofs (#70)
izyak May 18, 2023
33b532d
feat: Archway client integration (#72)
viveksharmapoudel May 22, 2023
427edc2
fix: Dockerfile (#71)
debendraoli May 22, 2023
7f2686a
feat: txn result (#73)
izyak May 24, 2023
166693b
feat: connection channel integration (#76)
viveksharmapoudel Jun 7, 2023
af85ede
feat: Add method to get ports (#77)
izyak Jun 11, 2023
4f316dd
fix: delay one block when assembling archway proof (#79)
viveksharmapoudel Jun 12, 2023
0d167ad
fix: handle no icon start height (#80)
viveksharmapoudel Jun 14, 2023
8893f5e
feat: icon txn result (#78)
izyak Jun 14, 2023
dc5891a
feat: handle for unordered channel (#81)
viveksharmapoudel Jun 15, 2023
fe2063c
fix: address restoration (#83)
debendraoli Jun 16, 2023
ae04ee1
feat: adjust commitment prefix (#84)
viveksharmapoudel Jun 20, 2023
863acbb
fix: adding network ids in clientState (#85)
viveksharmapoudel Jun 20, 2023
d0c5d34
feat: handle for packet timeout (#86)
viveksharmapoudel Jun 28, 2023
bbbde50
feat: merge relayer (#94)
izyak Jun 30, 2023
4fe98e1
fix: channel close (#96)
izyak Jul 3, 2023
c9a7f82
fix: handle case when query channel is empty (#102)
viveksharmapoudel Jul 4, 2023
9bda4f6
fix: remove commitmentprefix from icon (#98)
viveksharmapoudel Jul 4, 2023
6864056
fix: fetch proof from msg height not from latest height (#100)
viveksharmapoudel Jul 4, 2023
26e15af
fix: packet delayed ack (#103)
viveksharmapoudel Jul 13, 2023
a33a152
ci: add workflow to test deployment of relay locally (#92)
DeepakBomjan Jul 17, 2023
fc7b273
fix: first block try after issue (#106)
viveksharmapoudel Jul 17, 2023
44a2a9d
feat: add verifier for icon. (#105)
viveksharmapoudel Jul 19, 2023
dae32e6
feat: implement verifier archway (#110)
viveksharmapoudel Jul 19, 2023
03963fa
fix: archway module key add not working (#113)
viveksharmapoudel Jul 19, 2023
eb73ea8
fix: add log rolling (#107)
viveksharmapoudel Jul 19, 2023
16b98ee
fix: non adjacent light client (#109)
viveksharmapoudel Jul 24, 2023
53f03db
chore: TODOs for reviews (#115)
izyak Jul 25, 2023
9e0dd22
feat: save snapshot of serviced height in relay (#114)
izyak Jul 25, 2023
0f004b0
fix: generalize archway module as wasm (#112)
viveksharmapoudel Jul 25, 2023
63de3f8
fix: filter contract address wasm (#117)
viveksharmapoudel Jul 27, 2023
4b8eb4b
fix: packet retention not clear (#116)
viveksharmapoudel Jul 27, 2023
68c333d
fix: params for packet receipt and acknowledgement (#121)
izyak Aug 1, 2023
7df301a
feat: better logging for tx, provider, query, processor (#120)
izyak Aug 9, 2023
c5cd978
docs: deviation from cosmos relay (#129)
izyak Aug 9, 2023
4555d47
fix: icon update client retry issue (#127)
viveksharmapoudel Aug 9, 2023
4512450
feat: log height every hour simulateneously (#126)
izyak Aug 9, 2023
01a43b0
fix: timeout not being called on cosmos because of requestTimeout on …
izyak Aug 11, 2023
d87bfe3
feat: icon key refactor (#140)
izyak Aug 14, 2023
6be1cde
docs: update readme for ibc-icon-integration (#141)
izyak Aug 14, 2023
bccc1ca
fix: sdk prefix change handle for neutron and archway (#119)
viveksharmapoudel Aug 15, 2023
766c70b
docs: add local relay deployment guide (#139)
DeepakBomjan Aug 15, 2023
502fb75
test: fix test for icon keys (#143)
izyak Aug 16, 2023
69817d4
ci: add release workflow (#142)
DeepakBomjan Aug 16, 2023
f655074
fix: add missing mutex lock. (#145)
viveksharmapoudel Sep 1, 2023
505c2bb
ci: update local relay deployment test workflow (#146)
DeepakBomjan Sep 4, 2023
e55188a
fix: btp block missing issue fix (#150)
viveksharmapoudel Sep 4, 2023
3785abe
fix: icon module validate packet revision_number from chainId revert …
viveksharmapoudel Sep 4, 2023
a021c4a
feat: add step estimation for icon (#155)
izyak Sep 5, 2023
4addf92
fix: fix start height greater than latest height issue (#151)
viveksharmapoudel Sep 6, 2023
122d9bf
fix: sending packet fail issue (#161)
viveksharmapoudel Sep 6, 2023
829d29e
fix: use get packet receipt for has query receipt (#163)
izyak Sep 6, 2023
730d1a1
merge all from cosmos relayer
Sep 8, 2023
1a29419
chore: getMessagesToSend
Sep 8, 2023
de2e576
chore: fix build conflicts
Sep 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ clib/
data/
scripts/
testnets/
two-chains/
two-chains/
examples/
*.md
LICENSE
.github
1 change: 1 addition & 0 deletions .github/scripts/IBC-Integration
Submodule IBC-Integration added at 1f59cf
1 change: 1 addition & 0 deletions .github/scripts/archway
Submodule archway added at fd95e4
1 change: 1 addition & 0 deletions .github/scripts/gochain-btp
Submodule gochain-btp added at 4c7d22
1 change: 1 addition & 0 deletions .github/scripts/icon-ibc
Submodule icon-ibc added at 3886fa
188 changes: 188 additions & 0 deletions .github/scripts/start_relay.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
#!/bin/bash

SCRIPT=$(readlink -f $0)
SUBMODULE_DIR=$(dirname $SCRIPT)

GPG_FINGERPRINT="C787AB518A0C08B7AE1E1ADA2809A1A84E32159A"

ARCHWAY_CONTAINER='archway-node-1'

cd $SUBMODULE_DIR

echo $PWD

# Correct path
search_strings=(
"export IBC_RELAY="
"export IBC_INTEGRATION="
"export ICON_DOCKER_PATH="
"export WASM_DOCKER_PATH="
)

replacement="\$GITHUB_WORKSPACE\/.github\/scripts"
for search_string in "${search_strings[@]}"; do
sed -i "/$search_string/ s/\$HOME/$replacement/g" ./icon-ibc/const.sh
done

sed -i 's/export WASM_WALLET=godWallet/export WASM_WALLET=default/' ./icon-ibc/const.sh
sed -i 's/\(export WASM_EXTRA=\)"\([^"]*\)"\(.*\)/\1"--keyring-backend test"\3/' ./icon-ibc/const.sh

# Use below lines until there is version fix on wasm file
sed -i 's/\.wasm/_\.wasm/g' ./icon-ibc/const.sh
sed -i 's/cw_xcall_.wasm/cw_xcall_0.1.0.wasm/g' ./icon-ibc/const.sh
sed -i 's/cw_mock_dapp_multi_.wasm/cw_mock_dapp_multi_0.1.0.wasm/g' ./icon-ibc/const.sh

cat ./icon-ibc/const.sh

# sed -i 's/ARCHWAY_NETWORK=localnet/ARCHWAY_NETWORK=docker/' consts.sh
mkdir -p ~/.relayer/config
mkdir -p ~/keystore
cp ./gochain-btp/data/godWallet.json ~/keystore/godWallet.json
# Import fd account
pass init $GPG_FINGERPRINT

echo "### Create default wallet"
wallet=$(archwayd keys add default --keyring-backend test | awk -F\: '/address/ {print $2}' | tr -d '[:space:]')
echo $wallet

relay_wallet=$(archwayd keys add relayWallet --keyring-backend test | awk -F\: '/address/ {print $2}' | tr -d '[:space:]')

archwayd keys list --keyring-backend test




cd ${SUBMODULE_DIR}/archway

echo "## Before update .."
cat contrib/localnet/localnet.sh
# sed -i '/^archwayd add-genesis-account.*/a archwayd add-genesis-account "'"$wallet"'" 100000000000stake --keyring-backend=test' contrib/localnet/localnet.sh

sed -i '/archwayd add-genesis-account "\$addr" 1000000000000stake --keyring-backend=test/{p; a\
archwayd add-genesis-account "'"$wallet"'" 100000000000stake --keyring-backend=test\
archwayd add-genesis-account "'"$relay_wallet"'" 100000000000stake --keyring-backend=test
}' contrib/localnet/localnet.sh

awk '!seen[$0]++' contrib/localnet/localnet.sh > contrib/localnet/localnet_new.sh
mv contrib/localnet/localnet_new.sh contrib/localnet/localnet.sh
sed -i 's/latest/v0.4.0/' docker-compose.yaml

echo "### Check archwayd keys list on local"
archwayd keys list --keyring-backend os

echo "### Check archwayd start script content"
cat contrib/localnet/localnet.sh


cd $SUBMODULE_DIR/icon-ibc




# make nodes
bash -x ./nodes.sh start-all

sleep 30
echo "### Get fd wallet address"
fdwallet=$(docker exec $ARCHWAY_CONTAINER archwayd keys list --keyring-backend test | awk -F\: '/address/ {print $2}' | tr -d '[:space:]')

echo "### Check archwayd genesis file"
docker exec $ARCHWAY_CONTAINER cat /root/.archway/config/genesis.json

echo "### Check archwayd keys list on node"
docker exec $ARCHWAY_CONTAINER archwayd keys list

echo "### Check archwayd keys list on local"
archwayd keys list --keyring-backend os
archwayd keys list --keyring-backend test

echo "default:"
archwayd query bank balances $wallet
echo "fd:"
docker exec $ARCHWAY_CONTAINER archwayd query bank balances $fdwallet


echo "default: $wallet"
echo "fd: $fdwallet"

echo "### Checking docker logs"
docker logs $ARCHWAY_CONTAINER
echo "### Query balance of account"
echo "default:"
archwayd query bank balances $wallet
echo "fd:"
docker exec $ARCHWAY_CONTAINER archwayd query bank balances $fdwallet

echo -e "\nCopy default key to relayer keyring ======"
mkdir -p /home/runner/.relayer/keys/localnet/keyring-test
cp ~/.archway/keyring-test/default.info ~/.relayer/keys/localnet/keyring-test/default.info
cp ~/.archway/keyring-test/relayWallet.info ~/.relayer/keys/localnet/keyring-test/relayWallet.info
ls ~/.archway/keyring-test/*
ls ~/.relayer/keys/localnet/keyring-test/*

# make contracts
echo
echo "++++ Setting up icon"
bash -x ./icon.sh --setup

echo
echo "++++ Setting up archway"
bash -x ./wasm.sh --setup
echo
echo "++++ Deploying xcall on icon"
bash -x ./icon.sh --deploy-dapp
echo
echo "++++ Deploying xcall on archway"
bash -x ./wasm.sh --deploy-dapp
bash -x ./cfg.sh

## Check Score Address
echo "Checking Score Address..."
grep . $SUBMODULE_DIR/icon-ibc/env/archway/.*
grep . $SUBMODULE_DIR/icon-ibc/env/icon/.*

echo
echo "++++ Starting handshake ..."
# make handshake
rly tx clients icon-archway --client-tp "10000000m"
rly tx conn icon-archway

echo
echo "+++ Icon - Configure Connection"
bash -x ./icon.sh -c
echo
echo "+++ Archway - Configure Connection"
bash -x ./wasm.sh -c
echo
echo "+++ Create Channel"
rly tx chan icon-archway --src-port=xcall --dst-port=xcall

echo "Checking containers..."
docker ps -a
# cat ~/.relayer/config/config.yaml




echo "### all archwayd keys:"
archwayd keys list
echo "### keyring: os"
archwayd keys list --keyring-backend os
echo "### keyring: test"
archwayd keys list --keyring-backend test

echo "### Checking keys inside archway docker node:"
docker exec $ARCHWAY_CONTAINER archwayd keys list --keyring-backend os
docker exec $ARCHWAY_CONTAINER archwayd keys list --keyring-backend test


echo "+++++++++++++++++++++"
echo
echo
docker ps
echo "### Checking relay config"
find ./ -type f -name config.yaml
cat ~/.relayer/config/config.yaml
echo "==> Starting relayer..."
rly start icon-archway & sleep 60s; echo "* Stopping relay ..."; kill $!

22 changes: 8 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ on:
pull_request:
push:
branches:
- master
- main

jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
# Install and setup go
- name: Set up Go 1.19
uses: actions/setup-go@v2
- name: Set up Go 1.20
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: '1.20'

# setup gopath
- name: Set PATH
Expand All @@ -25,19 +25,13 @@ jobs:

# checkout relayer
- name: checkout relayer
uses: actions/checkout@v2

# setup cache
- uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
uses: actions/checkout@v3

# unit tests
- name: run unit tests
run: make test


# build binary
- name: build binary and move to upload location
run: make build
Expand All @@ -47,4 +41,4 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: rly
path: ./build/rly
path: ./build/rly
38 changes: 9 additions & 29 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,12 @@ on:
tags:
- '**'
branches:
- '**'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
- 'main'
- '82-run-relay-node-locally-on-pr-merge-to-main'

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand All @@ -28,27 +21,14 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v2.7.0
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
file: Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
repository: ${{ secrets.DOCKERHUB_USERNAME }}/relay-node
tag: latest
Loading
Loading