-
Notifications
You must be signed in to change notification settings - Fork 2
136 lines (116 loc) · 3.7 KB
/
main.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: Build
on:
push:
tags:
- v*
workflow_dispatch:
permissions:
contents: write
id-token: write
packages: write
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 30
needs:
- futu
- moomoo
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-release
cancel-in-progress: true
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- name: Create Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: startsWith(github.ref, 'refs/tags/')
with:
draft: false
prerelease: false
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
futu:
runs-on: ubuntu-latest
timeout-minutes: 30
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-futu
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/chasenlabs/futu-opend
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=${{ github.run_id }}
type=raw,value=latest
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
build-args: |
BRAND=Futu
DOMAIN=futunn.com
BIN_NAME=FutuOpenD
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: |
org.opencontainers.image.title=futu-opend
org.opencontainers.image.description=The futu-opend image
org.opencontainers.image.source=github.com/${{ github.repository }}
moomoo:
runs-on: ubuntu-latest
timeout-minutes: 30
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-moomoo
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/chasenlabs/moomoo-opend
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=${{ github.run_id }}
type=raw,value=latest
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
build-args: |
BRAND=moomoo
DOMAIN=futustatic.com
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: |
org.opencontainers.image.title=moomoo-opend
org.opencontainers.image.description=The moomoo-opend image
org.opencontainers.image.source=github.com/${{ github.repository }}