(Manual) Create New Docker Release #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | |
with: | |
token: ${{ secrets.FINOS_GITHUB_TOKEN }} | |
- name: Configure Git | |
run: | | |
git config --global user.email "[email protected]" | |
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, | |
example-esg, # TO BE REMOVED | |
] | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
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 |