From 107647b2afceae640f357cf79aecefd682742f18 Mon Sep 17 00:00:00 2001 From: Fedor Nikolaev Date: Wed, 22 Jan 2025 14:39:30 +0400 Subject: [PATCH] Add 0glabs, 0gchaind --- .github/workflows/0glabs.yml | 58 ++++++++++++++++++++++++++++++++++++ chains.yaml | 11 ++++++- 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/0glabs.yml diff --git a/.github/workflows/0glabs.yml b/.github/workflows/0glabs.yml new file mode 100644 index 0000000..ca081ef --- /dev/null +++ b/.github/workflows/0glabs.yml @@ -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 }} + diff --git a/chains.yaml b/chains.yaml index fd24488..602b706 100644 --- a/chains.yaml +++ b/chains.yaml @@ -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 @@ -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