-
Notifications
You must be signed in to change notification settings - Fork 309
55 lines (46 loc) · 1.34 KB
/
release.yaml
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
50
51
52
53
54
55
name: tag
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0
# It is important to check the GoReleaser config before pushing to
# Dockerhub to avoid having mismatches between what is in Dockerhub
# and GitHub releases.
- name: check releaser config
uses: goreleaser/goreleaser-action@v6
with:
args: check
version: "~> v1"
- name: login to docker hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: get version
id: get-version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: setup docker buildx
run: docker buildx create --name conftestbuild --use
- name: push images
env:
VERSION: ${{ steps.get-version.outputs.VERSION }}
run: make push TAG=$VERSION
- name: setup go
uses: actions/setup-go@v4
with:
go-version: "1.24.x"
- name: release
uses: goreleaser/goreleaser-action@v6
with:
args: release --clean
version: "~> v1"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}