Skip to content
This repository was archived by the owner on Apr 10, 2026. It is now read-only.

chore: update actions/setup-go action to v6.2.0 #604

chore: update actions/setup-go action to v6.2.0

chore: update actions/setup-go action to v6.2.0 #604

Workflow file for this run

name: build
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v6.0.1
- name: setup golang
uses: actions/setup-go@v6.2.0
with:
go-version-file: "go.mod"
- name: build project
env:
GOOS: linux
GOARCH: amd64
run: go build -tags netgo -o build/exporter main.go
- name: store binary
uses: actions/upload-artifact@v6.0.0
with:
name: exporter
path: build/exporter
docker:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: checkout repository
uses: actions/checkout@v6.0.1
- name: download binary
uses: actions/download-artifact@v7.0.0
with:
name: exporter
path: build
- name: login to github registry
uses: docker/login-action@v3.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build development image
uses: docker/build-push-action@v6.18.0
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
with:
context: .
tags: ghcr.io/${{ github.repository }}:development
push: ${{ github.ref == 'refs/heads/main' }}
- name: build latest image
uses: docker/build-push-action@v6.18.0
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
context: .
tags: ghcr.io/${{ github.repository }}:${{ github.ref_name }},ghcr.io/${{ github.repository }}:latest
push: true
release:
runs-on: ubuntu-latest
needs: [docker]
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- name: create new github release
uses: softprops/action-gh-release@v2.5.0