forked from sharat87/httpbun
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.16 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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"