Skip to content

Commit

Permalink
feat: add github workflow for build and release
Browse files Browse the repository at this point in the history
  • Loading branch information
kha7iq committed Feb 8, 2023
1 parent 62979b5 commit f28b5df
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: build

on:
push:
tags:
- 'v0.[0-9]+.[0-9]'

jobs:
build-exporter:
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20'

- uses: docker/setup-qemu-action@v2 # v2

- uses: docker/setup-buildx-action@v2 # v2

- name: Docker login GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker Login DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Release Exporter
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}

0 comments on commit f28b5df

Please sign in to comment.