-
Notifications
You must be signed in to change notification settings - Fork 86
59 lines (49 loc) · 1.37 KB
/
CI.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
56
57
58
59
name: CI
on:
push:
tags:
- "v*.*.*"
release:
types: [published]
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['>=1.22.2']
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Build ${{ matrix.go-version }}
run: |
make
make test
- name: Race conditions test
run: make race
- name: test Build Docker image
run: docker build .
docker_set_env:
needs: [build]
if: github.event_name == 'release'
uses: zcash/.github/.github/workflows/standard-versioning-for-docker.yaml@main
docker_build_push:
uses: zcash/.github/.github/workflows/build-and-push-docker-hub.yaml@main
needs: [build, docker_set_env]
if: github.event_name == 'release'
with:
image_name: ${{ github.event.repository.name }}
image_tags: ${{ needs.docker_set_env.outputs.tags }}
dockerfile: ./Dockerfile
context: .
build-args: ""
secrets:
dockerhub_registry: ${{ secrets.DOCKERHUB_REGISTRY }}
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_password: ${{ secrets.DOCKERHUB_PASSWORD }}