-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (45 loc) · 1.31 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
---
name: Publish
on:
push:
branches:
- main
release:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-go@v5
with:
go-version: '^1.22.2'
- run: make promu
- run: promu crossbuild -v
- name: Store binaries artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: .build
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Download binaries artifacts
uses: actions/download-artifact@v4
with:
name: build
path: .build
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: make docker DOCKER_IMAGE_TAG="${{ github.ref_name }}"
- run: make docker-publish DOCKER_IMAGE_TAG="${{ github.ref_name }}"
- run: make docker-manifest DOCKER_IMAGE_TAG="${{ github.ref_name }}"
- if: startsWith(github.ref, 'refs/tags/v')
run: |
make docker-tag-latest DOCKER_IMAGE_TAG="${{ github.ref_name }}"
make docker-publish DOCKER_IMAGE_TAG="latest"
make docker-manifest DOCKER_IMAGE_TAG="latest"