Skip to content

Commit

Permalink
Add haqq github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
felichita committed Jul 23, 2024
1 parent 8185e52 commit ebd81c6
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/haqq.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build and Push Haqq Docker Image

on:
push:
tags:
- "haqq-v[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:

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

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

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

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.21'

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

- name: Build Heighliner binary
run: |
go build -o heighliner
- name: Extract version from tag
id: extract_version
run: echo "VERSION=${GITHUB_REF#refs/tags/haqq-}" >> $GITHUB_ENV

- name: Manually pull the base Docker image
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
docker pull ghcr.io/p2p-org/cosmos-heighliner:infra-toolkit-${{ env.INFRA_TOOLKIT }}
- name: Build and push docker image
run: |
./heighliner build -c haqq --git-ref ${{ env.VERSION }}
- name: Tag and push Docker image
run: |
docker tag haqq:${{ env.VERSION }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:haqq-${{ env.VERSION }}
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:haqq-${{ env.VERSION }}
12 changes: 12 additions & 0 deletions chains.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,18 @@
binaries:
- /go/bin/gaiad

# Haqq (ISLM)
- name: haqq
github-organization: haqq-network
github-repo: haqq
dockerfile: cosmos
build-target: make install
build-env:
- LEDGER_ENABLED=false
- BUILD_TAGS=muslc
binaries:
- /go/bin/haqqd

# Cosmos Hub ICS
- name: ics
github-organization: cosmos
Expand Down

0 comments on commit ebd81c6

Please sign in to comment.