-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (47 loc) · 1.59 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:
push:
branches:
- main
release:
types:
- created
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5
with:
go-version: '^1.22.2'
- run: make promu
- run: promu crossbuild -v
- name: Store binaries artifacts
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4
with:
name: build
path: .build
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Download binaries artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
with:
name: build
path: .build
- name: Login to Docker Hub
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # 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"