Skip to content

test

test #124

name: Build & Install
on: [push]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-and-install:
runs-on: ubuntu-latest
strategy:
matrix:
go-arch: ["amd64", "arm", "arm64"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19.4
- name: Build
run: GOARCH=${{ matrix.go-arch }} make build
- name: Install
run: make install
push-gaiad-demo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Calculate commit hash for PR commit
run: echo "COMMIT_HASH=$(git rev-parse --short=7 ${{ github.event.pull_request.head.sha }})" >> $GITHUB_ENV
- name: Calculate commit hash for merge commit
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
- name: Login to dockerhub
run: docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} docker.io
- name: Build and Push
run: |
docker pull komodoofficial/gaiad:latest@sha256:3e322a09696f70aa1cc7966e3930223f34179a0c33371a4b78a62c4417c4beea
docker tag komodoofficial/gaiad:latest@sha256:3e322a09696f70aa1cc7966e3930223f34179a0c33371a4b78a62c4417c4beea komodoofficial/gaiad:kdf-ci
docker push komodoofficial/gaiad:kdf-ci
git clone https://github.com/cosmos/gaia
cd gaia
docker build -t komodoofficial/gaiad:latest -f ./Dockerfile .
docker push komodoofficial/gaiad:latest
push-ibc-relayer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Calculate commit hash for PR commit
run: echo "COMMIT_HASH=$(git rev-parse --short=7 ${{ github.event.pull_request.head.sha }})" >> $GITHUB_ENV
- name: Calculate commit hash for merge commit
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
- name: Login to dockerhub
run: docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} docker.io
- name: Build and Push
run: |
docker pull komodoofficial/ibc-relayer:latest@sha256:5a4f27d75afa8e4d516506d0043978fc775ae950a42358e2c345b060102a05f5
docker tag komodoofficial/ibc-relayer:latest@sha256:5a4f27d75afa8e4d516506d0043978fc775ae950a42358e2c345b060102a05f5 komodoofficial/ibc-relayer:kdf-ci
docker push komodoofficial/ibc-relayer:kdf-ci
git clone https://github.com/cosmos/relayer
cd relayer
git checkout df42391dd3ab04fce238adb7b4112d7bd10fa63c
rm ./Dockerfile
cp ../Dockerfile.rly ./Dockerfile
docker build -t komodoofficial/ibc-relayer:latest -f ./Dockerfile .
docker push komodoofficial/ibc-relayer:latest
container-build-and-push:
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Calculate commit hash for PR commit
if: github.event_name == 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 ${{ github.event.pull_request.head.sha }})" >> $GITHUB_ENV
- name: Calculate commit hash for merge commit
if: github.event_name != 'pull_request'
run: echo "COMMIT_HASH=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
- name: Login to dockerhub
run: docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} docker.io
- name: Build and Push
run: |
docker build -t komodoofficial/nucleusd:"$COMMIT_HASH" -t komodoofficial/nucleusd:latest -f ./Dockerfile .
# Here we push two images. "latest" image gets overridden with each
# push and $COMMIT_HASH is a constant image so we can use a specific
# build in container environments if needed (usually for debugging purposes).
docker push komodoofficial/nucleusd:"$COMMIT_HASH"
docker push komodoofficial/nucleusd:latest