Skip to content

On any branches or tags #1

On any branches or tags

On any branches or tags #1

Workflow file for this run

name: build_docker
on:
push:
branches:
- '**'
tags:
- '**'
jobs:
build_lint_test:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.3
- name: Print Go environment
run: go env
- name: Cache Go modules
id: go-cache
uses: actions/cache@v4
with:
path: |
~/.go/pkg/mod
~/.cache/go-build
key: go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: |
go-mod-
- name: Install Dependencies
run: sudo apt-get install libzmq3-dev
- name: Build staking-indexer
run: make build
- name: Lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.55.2
./bin/golangci-lint run --timeout 5m0s
- name: Run tests
run: make test
- name: Run integration tests
run: make test-e2e
build_docker:
runs-on: ubuntu-22.04
needs: build_lint_test
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v6
with:
tags: staking-indexer:${{ github.sha }}
outputs: type=docker,dest=/tmp/staking-indexer.tar
- name: Upload Docker image to workspace
uses: actions/upload-artifact@v4
with:
name: staking-indexer
path: /tmp/staking-indexer.tar