Skip to content

Commit

Permalink
github: add release action
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoBrigitte committed Oct 20, 2024
1 parent c0029ab commit f5b36d5
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: release

on:
push:
tags:
- v*

jobs:
release:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- uses: goreleaser/goreleaser-action@v6
with:
args: release --clean
version: "~> v2"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BUILD_BRANCH: ${{ vars.BUILD_BRANCH }}
BUILD_USER: ${{ vars.BUILD_USER }}
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/build-push-action@v6
with:
push: true
tags: theo01/prometheus-dummy-exporter:latest
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<a href="https://goreportcard.com/report/github.com/TheoBrigitte/prometheus-dummy-exporter"><img src="https://goreportcard.com/badge/github.com/TheoBrigitte/prometheus-dummy-exporter" alt="Go Report Card"></a>
<a href="https://github.com/TheoBrigitte/prometheus-dummy-exporter/releases"><img src="https://img.shields.io/github/release/TheoBrigitte/prometheus-dummy-exporter"></a>
<a href="https://github.com/TheoBrigitte/prometheus-dummy-exporter/actions/workflows/test.yaml"><img src="https://github.com/TheoBrigitte/prometheus-dummy-exporter/actions/workflows/test.yaml/badge.svg?branch=main" alt="Github action"></a>
<a href="https://hub.docker.com/r/theo01/prometheus-dummy-exporter"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/theo01/prometheus-dummy-exporter"></a>
</p>


Expand Down

0 comments on commit f5b36d5

Please sign in to comment.