Skip to content

Publish

Publish #6

Workflow file for this run

name: Publish
on:
workflow_dispatch:
inputs:
git-ref:
description: The target `git` branch, `git` tag or `git` SHA to be released.
required: false
default: master
jobs:
all:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.git-ref }}
- name: Get versions
id: versions
run:
sed 's/ /=/' .tool-versions | tee -a "$GITHUB_OUTPUT"
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ steps.versions.outputs.golang }}
- name: Test
run: make test
- name: Build
run: make docker
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: blend
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push Docker images to ghcr.io
run: |
docker tag httpbun "ghcr.io/blend/httpbun:${{ github.event.inputs.git-ref }}"
docker tag httpbun "ghcr.io/blend/httpbun:latest"
docker push --all-tags "ghcr.io/blend/httpbun"