Skip to content

Commit

Permalink
Merge pull request #8 from p2p-org/felichita/add-0glabs
Browse files Browse the repository at this point in the history
Add 0glabs, 0gchaind
  • Loading branch information
felichita authored Jan 22, 2025
2 parents 37498c2 + 107647b commit f2827c8
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 1 deletion.
58 changes: 58 additions & 0 deletions .github/workflows/0glabs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build and Push 0glabs Docker Image

on:
push:
tags:
- "0glabs-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/0glabs-}" >> $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 0glabs --git-ref ${{ env.VERSION }}
- name: Tag and push Docker image
run: |
docker tag 0glabs:${{ env.VERSION }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:0glabs-${{ env.VERSION }}
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:0glabs-${{ env.VERSION }}
11 changes: 10 additions & 1 deletion chains.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# 0glabs
- name: 0glabs
github-organization: 0glabs
github-repo: 0g-chain
dockerfile: cosmos
build-target: make install
binaries:
- /go/bin/0gchaind

# Acrechain
- name: acrechain
github-organization: ArableProtocol
Expand Down Expand Up @@ -1263,7 +1272,7 @@
github-organization: phoenix-directive
github-repo: core
dockerfile: cosmos
pre-build: |
pre-build: |
GO_VERSION=1.22.10
apk update
apk add --no-cache --virtual .build-deps bash gcc musl-dev openssl go
Expand Down

0 comments on commit f2827c8

Please sign in to comment.