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

Add 0glabs, 0gchaind #8

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
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
Loading