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

Feature/ccv #2

Merged
merged 4 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- master
- '**'

jobs:
build:
Expand Down
89 changes: 49 additions & 40 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
@@ -1,54 +1,63 @@
name: Create and publish a Docker image
name: Build and Push to DockerHub

on:
push:
tags:
- '**'
branches:
- '**'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
- "v*.*.*"

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

env:
GOPRIVATE: github.com/sagaxyz/*
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Log in to the Container registry
uses: docker/login-action@v1
- name: Set up access to private Go modules
env:
GITHUB_USER: ${{ secrets.GH_USER }}
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
run: git config --global url."https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com".insteadOf "https://github.com"

- name: Checkout
uses: actions/checkout@v3
-
name: Git fetch everything
run: git fetch --prune --unshallow
- name: Setup Go
uses: actions/setup-go@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
go-version-file: './go.mod'
cache: true
- run: go version

- name: Compile rly
run : make build
-
name: Get Github tag
id: meta
uses: docker/metadata-action@v3
run: |
echo "::set-output name=tag::$(echo ${{github.ref_name}} | sed -e 's/^v//')"
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/[email protected]
registry: docker.io
username: sagaxyz
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
file: Dockerfile
file: saga.Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
GITHUB_USER=${{ secrets.GH_USER }}
GITHUB_TOKEN=${{ secrets.GH_ACCESS_TOKEN }}
platforms: linux/amd64
tags: sagaxyz/go-relayer:${{ steps.meta.outputs.tag }}, sagaxyz/spc:latest
2 changes: 1 addition & 1 deletion .github/workflows/interchaintest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- master
- main

jobs:
events:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ dist/

# Don't commit the vendor directory if anyone runs 'go mod vendor'.
/vendor
docker-compose.yml
37 changes: 37 additions & 0 deletions docker-compose.yml.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: '3'

services:
ashishchandr70 marked this conversation as resolved.
Show resolved Hide resolved
rly:
container_name: rly
image: "rly:latest"
build:
context: .
dockerfile: saga.Dockerfile
environment:
- KEYNAME=relayer
- PROVIDER_CHAINID=
- CONSUMER_CHAINID=
- PROVIDER_RLY_MNEMONIC=
- CONSUMER_RLY_MNEMONIC=
- KEYRING=test # remember to change to other types of keyring like 'file' in-case exposing to outside world, otherwise your balance will be wiped quickly. The keyring test does not require private key to steal tokens from you
- KEYALGO=secp256k1
- KEYPASSWD="passw0rdK3y"
- PROVIDER_RPC_ADDRESS=
- CONSUMER_RPC_ADDRESS=
- RLY_SRC_PORT=consumer # Do not change unless you know what you are doing. This impacts the IBC connection ports
- RLY_DST_PORT=provider # Do not change unless you know what you are doing
- RLY_ORDERING=ordered # Do not change unless you know what you are doing
- RLY_DEBUG=true # set it to false as needed
networks:
- localnet
ports:
- 5183:5183
volumes:
- ./rly/start-rly.sh:/root/start-rly.sh

volumes:
relayer:

networks:
localnet:

26 changes: 26 additions & 0 deletions rly/sample-rly.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"type": "cosmos",
"value": {
"key": "",
"chain-id": "",
"rpc-addr": "",
"account-prefix": "saga",
"keyring-backend": "test",
"gas-adjustment": 1.2,
"gas-prices": "0stake",
"min-gas-amount": 0,
"max-gas-amount": 0,
"debug": true,
"timeout": "20s",
"block-timeout": "",
"output-format": "json",
"sign-mode": "direct",
"extra-codecs": [],
"coin-type": null,
"signing-algorithm": "",
"broadcast-mode": "batch",
"min-loop-duration": 0,
"extension-options": [],
"feegrants": null
}
}
Loading
Loading