-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (43 loc) · 1.17 KB
/
docker_hipush.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
name: Hipush Docker Image
on:
push:
branches:
- 'releases/**'
- 'main'
- 'master'
paths:
- 'api/**.go'
- 'cmd/**.go'
- 'config/**.go'
- 'internal/**.go'
jobs:
build_hipush:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 8
- uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to Container Registry
uses: docker/login-action@v2
with:
registry: https://${{ secrets.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build And Push Docker Image
shell: bash
run: |
set -o xtrace
branch="${GITHUB_REF#refs/heads/}"
timestamp=`TZ="Asia/Shanghai" date +"%Y%m%d%H%M%S"`
export GO111MODULE=on
export VERSION="$branch-$timestamp-solo"
export GOOS=linux
export ARCH=all
export REGISTRY=${{ secrets.REGISTRY }}/cossim
make docker-build docker-push