-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (72 loc) · 2.13 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
name: release
on:
push:
tags:
- '*'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Ginkgo
run: |
go install github.com/onsi/ginkgo/v2/ginkgo
go install github.com/onsi/gomega/...
- name: Test
run: ginkgo -r --randomize-all --randomize-suites --fail-on-pending --cover --trace --race --show-node-events
release:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{github.repository}}
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Get TAG
id: get_tag
run: echo TAG=${GITHUB_REF#refs/tags/} >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to container registry
uses: docker/login-action@v2
with:
registry: quay.io/rh-marketplace
username: ${{secrets['quayUser']}}
password: ${{secrets['quayPassword']}}
- name: Release build
id: release_build
uses: docker/build-push-action@v3
with:
outputs: "type=registry,push=true"
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
build-args: |
Version=${{ env.TAG }}
GitCommit=${{ github.sha }}
tags: |
quay.io/rh-marketplace/datactl:${{ github.sha }}
quay.io/rh-marketplace/datactl:${{ env.TAG }}
quay.io/rh-marketplace/datactl:latest