Publish Release #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# workflow name | |
name: Publish Release | |
# on events | |
on: | |
workflow_dispatch: | |
inputs: | |
releaseTag: | |
description: 'Existing Tag to checkout.' | |
type: string | |
required: true | |
default: '' | |
# jobs to run | |
jobs: | |
publish: | |
name: Publish docker image | |
runs-on: | |
- ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: get go version | |
run: go version | |
- name: Check out release tag | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.releaseTag }} | |
fetch-tags: true | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
id: go | |
- name: Login to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Pushing docker images | |
run: make push | |
- name: Uploading binary files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: zookeeper-exporter | |
path: bin/zookeeper-exporter* |