Skip to content

Merge pull request #122 from nspcc-dev/120-balance_notary-metrics-dis… #62

Merge pull request #122 from nspcc-dev/120-balance_notary-metrics-dis…

Merge pull request #122 from nspcc-dev/120-balance_notary-metrics-dis… #62

Workflow file for this run

name: Builds
on:
pull_request:
branches:
- master
types: [opened, synchronize]
paths-ignore:
- '**/*.md'
push:
# Build for the master branch.
branches:
- master
release:
# Publish released commit as Docker `latest` and `git_revision` images.
types:
- published
workflow_dispatch:
inputs:
ref:
description: 'Ref to build the binary [default: latest master; examples: v0.10.0, 0a4ff9d3e4a9ab432fd5812eb18c98e03b5a7432]'
required: false
default: ''
jobs:
build_cli:
name: Build CLI
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
cache: true
go-version: 1.22
- name: Check version
run: if [[ $(make version) == *"dirty"* ]]; then exit 1; fi
- name: Build CLI
run: make
- name: Rename CLI binary
run: mv ./bin/neo-exporter* ./bin/neo-exporter-linux-amd64
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: neo-exporter
path: ./bin/neo-exporter*
if-no-files-found: error
- name: Attach binary to the release as an asset
if: ${{ github.event_name == 'release' }}
run: gh release upload ${{ github.event.release.tag_name }} ./bin/neo-exporter-linux-amd64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build_image:
needs: build_cli
name: Build Docker image
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
cache: true
go-version: 1.22
- name: Build Docker image
run: make image