Skip to content

Commit

Permalink
github: release docker image with goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoBrigitte committed Oct 21, 2024
1 parent d0b0095 commit ddb7263
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ on:
jobs:
release:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: goreleaser/goreleaser-action@v6
with:
args: release --clean
Expand All @@ -22,12 +26,3 @@ jobs:
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
5 changes: 4 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: test

on: push
on:
push:
tags-ignore:
- v*

jobs:
test:
Expand Down
6 changes: 6 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ archives:
- goos: windows
format: zip

dockers:
- image_templates:
- theo01/prometheus-dummy-exporter
extra_files:
- example/simple.yml

changelog:
sort: asc
filters:
Expand Down

0 comments on commit ddb7263

Please sign in to comment.