-
Notifications
You must be signed in to change notification settings - Fork 188
85 lines (82 loc) · 3.39 KB
/
manual__create-new-docker-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
name: (Manual) Create New Docker Release
on:
workflow_dispatch:
inputs:
tag:
description: "Tag - e.g. 2023-09-09, 2022-10-10 (default to today's date)"
required: false
legend_engine_version:
description: "Legend Engine version"
required: false
legend_sdlc_version:
description: "Legend SDLC version"
required: false
legend_studio_version:
description: "Legend Studio version"
required: false
# This script will create a new release version of date format (YYYY-MM-DD)
# and bump dependecies version in Legend Omnibus
# See https://github.com/finos/legend/tree/master/installers/omnibus
jobs:
create-new-docker-release:
# There is currently no way to limit workflow dispatch to only allow default branch
# so we need to restrict it here
# See https://github.community/t/limit-branch-for-workflow-dispatch/122099
if: github.ref == 'refs/heads/master' && github.repository == 'finos/legend'
name: Create New Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3.5.2
with:
token: ${{ secrets.FINOS_GITHUB_TOKEN }}
- name: Configure Git
run: |
git config --global user.email "37706051+finos-admin@users.noreply.github.com"
git config --global user.name "FINOS Administrator"
- name: Create New Release Version
env:
NEW_VERSION: ${{ github.event.inputs.tag }}
NEW_ENGINE_VERSION: ${{ github.event.inputs.legend_engine_version }}
NEW_SDLC_VERSION: ${{ github.event.inputs.legend_sdlc_version }}
NEW_STUDIO_VERSION: ${{ github.event.inputs.legend_studio_version }}
run: |
chmod +x ./scripts/create-new-release.sh
./scripts/create-new-release.sh
publish-new-docker-release:
needs: [create-new-docker-release]
# There is currently no way to limit workflow dispatch to only allow default branch
# so we need to restrict it here
# See https://github.community/t/limit-branch-for-workflow-dispatch/122099
if: github.ref == 'refs/heads/master' && github.repository == 'finos/legend'
name: Publish New Release
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
variant:
- full
- slim
- slim-dbs
steps:
- name: Checkout code
uses: actions/checkout@v3.5.2
with:
# NOTE: ensure checking out the latest code from the default branch to get the published version update
ref: "master"
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: finos
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish Omnibus to Docker
working-directory: ./installers/omnibus
env:
LEGEND_OMNIBUS_CONFIG_GITLAB_PAT: ${{ secrets.LEGEND_DEV_TEAM_GITLAB_READ_ONLY_PAT }}
LEGEND_OMNIBUS_CONFIG_GITLAB_OAUTH_APPLICATION_ID: ${{ secrets.LEGEND_DEV_TEAM_GITLAB_READ_ONLY_OAUTH_APP_ID }}
LEGEND_OMNIBUS_CONFIG_GITLAB_OAUTH_APPLICATION_SECRET: ${{ secrets.LEGEND_DEV_TEAM_GITLAB_READ_ONLY_OAUTH_SECRET_ID }}
run: |
chmod +x ./variants/${{ matrix.variant }}/publish.sh
chmod +x ./variants/${{ matrix.variant }}/build.sh
chmod +x ./variants/${{ matrix.variant }}/test.sh
./variants/${{ matrix.variant }}/publish.sh