forked from argoproj/argo-events
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (84 loc) · 2.23 KB
/
release.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: release
on:
push:
tags:
- 'v*'
branches:
- master
defaults:
run:
shell: bash
jobs:
build-binaries:
runs-on: ubuntu-20.04
name: Build binaries
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Go
uses: actions/[email protected]
with:
go-version: 1.17.1
- name: Build binaries
run: |
make build
chmod -R +x dist
- name: Make checksums
run: make checksums
- name: store artifacts
uses: actions/upload-artifact@v2
with:
name: binaries
path: dist
build-push-linux-multi:
name: Build & push linux/amd64 and linux/arm64
needs: [ build-binaries ]
runs-on: ubuntu-20.04
strategy:
matrix:
target: [ argo-events ]
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Download binaries
uses: actions/download-artifact@v2
with:
name: binaries
path: dist/
- name: Registry Login
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAYIO_USERNAME }}
password: ${{ secrets.QUAYIO_PASSWORD }}
- name: set Version
id: version
run: |
tag=$(basename $GITHUB_REF)
if [ $tag = "master" ]; then
tag="latest"
fi
echo "::set-output name=VERSION::$tag"
- name: Container build and push with arm64/amd64
run: |
IMAGE_NAMESPACE=${{ secrets.QUAYIO_ORG }} VERSION=${{ steps.version.outputs.VERSION }} DOCKER_PUSH=true make image-multi
release:
runs-on: ubuntu-latest
needs: [ build-push-linux-multi ]
steps:
- name: Download binaries
uses: actions/download-artifact@v2
with:
name: binaries
path: dist/
- name: Release binaries
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist/*.gz
dist/*.gz.sha256
manifests/*.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}