Build & publish the apps #2112
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: Build & publish the apps | |
on: | |
workflow_dispatch: | |
inputs: | |
dashboard_version: | |
description: "Dashboard package version to use" | |
required: false | |
default: "dev" | |
push: | |
branches: [main] | |
jobs: | |
publish-docker-image: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
app: | |
[ | |
"in-browser", | |
"node-smart-proxy", | |
"dynamic-datasets-dashboard", | |
"identity", | |
"programmatic-in-browser", | |
"in-browser-encrypted-dashboards", | |
"global-library-with-editor", | |
"in-browser-encrypted-dashboard-management", | |
"in-browser-webcomponent", | |
"dashboard-management", | |
"dynamic-remote-config", | |
"upcasting-regression-testing", | |
"track-user-events", | |
"pdf-download-with-addons", | |
"pdf-download-with-no-addons", | |
"sql-views", | |
"microsoft-sql-server", | |
"nextjs-v12_3_4", | |
"redshift", | |
"result-accuracy", | |
"dashboard-external-filters", | |
"in-browser-global-library", | |
"js-services-only", | |
"editor-webcomponent", | |
"remote-config-endpoint", | |
"custom-components", | |
"original-koala", | |
"cra", | |
"cra-programmatic", | |
"webcomponent", | |
"any-managed-euc-cloud", | |
"remote-origin-simulator-backed", | |
"www-react-17", | |
"gain-theory-config-building" | |
] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.PACKAGES_GITHUB_TOKEN }} | |
- name: Get & set release tag | |
id: vars | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | |
- name: Build, publish & release the image | |
env: | |
IMAGE_TAG: ${{ github.sha }} | |
APP_NAME: eucalyptus-${{ matrix.app }} | |
run: | | |
USER_INPUT_VERSION=${{ inputs.dashboard_version }} | |
VERSION=${USER_INPUT_VERSION:-"dev"} | |
echo "Installing version @${VERSION}" | |
# Upgrade the dev package of the dashboard | |
yarn --cwd ./apps/${{ matrix.app }} add @vizzly/dashboard@${VERSION} | |
yarn --cwd ./apps/${{ matrix.app }} add @vizzly/services@${VERSION} | |
# Build the image with a tag that can be referenced. | |
docker build -f ./apps/${{ matrix.app }}/Dockerfile ./apps/${{ matrix.app }} -t $APP_NAME\:latest | |
# Tag the image with GitHub container registry | |
docker tag $APP_NAME:latest ghcr.io/vizzly-co/$APP_NAME:$IMAGE_TAG | |
docker tag $APP_NAME:latest ghcr.io/vizzly-co/$APP_NAME:latest | |
# Push the images to the repositories | |
docker push ghcr.io/vizzly-co/$APP_NAME --all-tags |