Skip to content

Merge pull request #14 from civo/feat-dockerhub #3

Merge pull request #14 from civo/feat-dockerhub

Merge pull request #14 from civo/feat-dockerhub #3

Workflow file for this run

name: release
on:
workflow_dispatch: {}
push:
tags:
- 'v*.*.*'
permissions:
packages: write
contents: write
jobs:
run-goreleaser:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Log in to GHCR
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Extract short SHA
id: vars
run: echo "SHA_SHORT=${GITHUB_SHA::7}" >> $GITHUB_ENV
- name: Release Container Image to Github
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: release --clean
env:
SHA_SHORT: ${{ env.SHA_SHORT }}
GITHUB_REPOSITORY: ${{ github.repository }}