Skip to content

Commit

Permalink
Merge branch 'main' into dan/param-cmds
Browse files Browse the repository at this point in the history
  • Loading branch information
boojamya committed Jul 7, 2023
2 parents ed7f4e2 + 1a43778 commit 6474807
Show file tree
Hide file tree
Showing 14 changed files with 555 additions and 675 deletions.
28 changes: 6 additions & 22 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Create and Push Docker Image

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

Expand All @@ -19,35 +17,21 @@ jobs:
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

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

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

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

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: strangelove-ventures/heighliner-build-action@v0.0.3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
chain: noble
dockerfile: cosmos
build-target: make install
binaries: |
- /go/bin/nobled
59 changes: 59 additions & 0 deletions .github/workflows/draft-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Create and Push Docker Image

on:
push:
tags:
- '**'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

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

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

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

- name: Build and push Docker image
uses: strangelove-ventures/[email protected]
with:
chain: noble
dockerfile: cosmos
build-target: make install
binaries: |
- /go/bin/nobled
draft-release:
needs: build-and-push-image
runs-on: ubuntu-latest
steps:
- name: Copy Binary
run: |
docker create -it --entrypoint sh --name amd --platform linux/amd64 ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.ref_name }}
docker create -it --entrypoint sh --name arm --platform linux/arm64 ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.ref_name }}
docker cp amd:/bin/nobled ./nobled_linux-amd64
docker cp arm:/bin/nobled ./nobled_linux-arm64
sha256sum ./nobled_linux-amd64 > ./nobled_sha256.txt
sha256sum ./nobled_linux-arm64 >> ./nobled_sha256.txt
- name: Draft Release
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
nobled_linux-amd64
nobled_linux-arm64
nobled_sha256.txt
36 changes: 15 additions & 21 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:

env:
TAR_PATH: ./binary_docker
TAR_PATH: heighliner.tar

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -14,27 +14,21 @@ jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.19

- name: checkout chain
uses: actions/checkout@v3

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

- name: Build Docker image
uses: docker/build-push-action@v3
uses: strangelove-ventures/heighliner-build-action@v0.0.3
with:
context: .
platforms: linux/amd64
tags: noble:local
# Export tarball image to upload and share with other runners
outputs: type=docker,dest=${{ env.TAR_PATH }}
cache-from: type=gha
cache-to: type=gha,mode=max
registry: # empty registry, image only shared for e2e testing
tag: local # emulate local environment for consistency in interchaintest cases
tar-export-path: ${{ env.TAR_PATH }} # export a tarball that can be uploaded as an artifact for the e2e jobs
platform: linux/amd64 # test runner architecture only
git-ref: ${{ github.head_ref }} # source code ref

# Heighliner chains.yaml config
chain: noble
dockerfile: cosmos
build-target: make install
binaries: |
- /go/bin/nobled
- name: Publish Tarball as Artifact
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -69,4 +63,4 @@ jobs:
run: docker image load -i ${{ env.TAR_PATH }}

- name: run test
run: make ${{ matrix.test }}
run: make ${{ matrix.test }}
30 changes: 0 additions & 30 deletions Dockerfile

This file was deleted.

Loading

0 comments on commit 6474807

Please sign in to comment.