-
Notifications
You must be signed in to change notification settings - Fork 123
33 lines (30 loc) · 1.31 KB
/
build-and-publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Build and Publish Incredible Squaring Aggregator and Operator
on:
push:
branches: ['master']
paths:
- '**.go'
# we can also trigger manually in case needed
workflow_dispatch:
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
permissions:
# Need this to be allowed to publish image to registry
# see https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
packages: write
contents: read
steps:
- uses: actions/setup-go@v2
with:
go-version: '1.20.x'
- uses: actions/checkout@v2
- uses: ko-build/[email protected]
# We build both the aggregator and the operator in the same job
# we could separate them, but anyways they share core/ so it would get messy
# See https://ko.build/configuration/#naming-images to understand --preserve-import-paths
# TODO: this currently fails when trying to read from private eigensdk-go repo...
# prob need to add permission somewhere. will figure out some other time, or maybe wait until we make it public
- run: KO_DOCKER_REPO=ghcr.io/layr-labs/incredible-squaring ko build aggregator/cmd/main.go --preserve-import-paths
- run: KO_DOCKER_REPO=ghcr.io/layr-labs/incredible-squaring ko build operator/cmd/main.go --preserve-import-paths