forked from vesoft-inc/nebula-graph
-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (104 loc) · 3.18 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
98
99
100
101
102
103
104
105
106
107
108
109
name: release
on:
release:
types:
- published
defaults:
run:
shell: bash
jobs:
package:
name: build package
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os:
- ubuntu1604
- ubuntu1804
- ubuntu2004
# - centos6
- centos7
- centos8
container:
image: vesoft/nebula-dev:${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: ./.github/actions/tagname-action
id: tag
- name: package
run: ./package/package.sh -b ${{ steps.tag.outputs.tag }}
- name: output some vars
id: vars
env:
SHA_EXT: sha256sum.txt
run: |
tag=$(echo ${{ github.ref }} | rev | cut -d/ -f1 | rev)
filename=$(find pkg-build/cpack_output -type f \( -iname \*.deb -o -iname \*.rpm \))
sha256sum $filename > $filename.$SHA_EXT
subdir=$(echo $tag |sed 's/^v//')
echo "::set-output name=subdir::$subdir"
- uses: ./.github/actions/upload-assets-action
with:
asset-path: pkg-build/cpack_output
tag: ${{ steps.tag.outputs.tag }}
- uses: ./.github/actions/upload-to-oss-action
with:
key-id: ${{ secrets.OSS_ID }}
key-secret: ${{ secrets.OSS_SECRET }}
endpoint: ${{ secrets.OSS_ENDPOINT }}
bucket: nebula-graph
asset-path: pkg-build/cpack_output
target-path: package/${{ steps.vars.outputs.subdir }}
docker_build_graph:
name: docker-graph
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/tagname-action
id: tagname
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
tags: vesoft/nebula-graphd:${{ steps.tagname.outputs.tag }}
push: true
build-args: |
BRANCH=${{ steps.tagname.outputs.tag }}
docker_build_storage:
name: docker-storage
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
service:
- metad
- storaged
- tools
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/tagname-action
id: tagname
- uses: actions/checkout@v2
with:
repository: ${{ github.repository_owner }}/nebula-storage
ref: ${{ steps.tagname.outputs.tag }}
path: modules/nebula-storage
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/build-push-action@v2
with:
context: modules/nebula-storage
file: ./modules/nebula-storage/docker/Dockerfile.${{ matrix.service }}
tags: vesoft/nebula-${{ matrix.service }}:${{ steps.tagname.outputs.tag }}
push: true
build-args: |
BRANCH=${{ steps.tagname.outputs.tag }}