Skip to content

Commit 3422b13

Browse files
committed
add celestia-node to github actions
1 parent aa4bfff commit 3422b13

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/celestia-node.yml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build and Push celestia-node Docker Image
2+
3+
on:
4+
push:
5+
tags:
6+
- "celestia-node-v[0-9]+.[0-9]+.[0-9]+"
7+
workflow_dispatch:
8+
9+
env:
10+
REGISTRY: ghcr.io
11+
IMAGE_NAME: ${{ github.repository }}
12+
INFRA_TOOLKIT: v0.1.6
13+
14+
jobs:
15+
build-and-push-celestia:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
packages: write
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v2
24+
25+
- name: Set up Go
26+
uses: actions/setup-go@v3
27+
with:
28+
go-version: '1.22'
29+
30+
- name: Log in to the Container registry
31+
uses: docker/login-action@v1
32+
with:
33+
registry: ${{ env.REGISTRY }}
34+
username: ${{ github.actor }}
35+
password: ${{ secrets.GITHUB_TOKEN }}
36+
37+
- name: Build Heighliner binary
38+
run: |
39+
go build -o heighliner
40+
41+
- name: Extract version from tag
42+
id: extract_version
43+
run: echo "VERSION=${GITHUB_REF#refs/tags/celestia-}" >> $GITHUB_ENV
44+
45+
- name: Manually pull the base Docker image
46+
run: |
47+
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
48+
docker pull ghcr.io/p2p-org/cosmos-heighliner:infra-toolkit-${{ env.INFRA_TOOLKIT }}
49+
50+
- name: Build and push celestia-node Docker image
51+
run: |
52+
./heighliner build -c celestia-node --git-ref ${{ env.VERSION }}
53+
54+
- name: Tag and push Docker image
55+
run: |
56+
docker tag celestia-node:${{ env.VERSION }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:celestia-node-${{ env.VERSION }}
57+
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:celestia-node-${{ env.VERSION }}

0 commit comments

Comments
 (0)