Skip to content

Release

Release #33

Workflow file for this run

name: Release
on:
release:
types: [published]
env:
IMAGE: ${{ github.repository_owner }}/${{ github.repository }}
REGISTRY: "ghcr.io"
GO_VERSION: "1.21"
TAG: ${{ github.event.release.tag_name }}
jobs:
release:
name: Release Image
runs-on: ubuntu-22.04
steps:
- name: Login
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Build Image
run: |
docker build -t ${{ env.REGISTRY}}/${{ env.IMAGE }}:${TAG#v} .
- name: Push Image
run: |
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE }}:${TAG#v} ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest
docker push ${{ env.REGISTRY }}/${{ env.IMAGE }}:${TAG#v}
docker push ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest