Env Setup - Deploy forms server from v2.4.0-5303(form.io tag v4.3.0) to Staging #53
Workflow file for this run
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: Env Setup - Deploy Forms Server | |
run-name: Env Setup - Deploy forms server from ${{ github.ref_name }}(form.io tag ${{ inputs.formioTag }}) to ${{ inputs.environment }} | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: "Environment the formio is deployed." | |
required: true | |
type: environment | |
formioTag: | |
description: "Formio tag, please refer https://github.com/formio/formio/tags to deploy the appropriate tag." | |
type: string | |
required: true | |
default: "v4.3.0" | |
jobs: | |
deploy: | |
name: Deploy Forms Server | |
runs-on: ubuntu-latest | |
environment: ${{ inputs.environment }} | |
env: | |
FORMS_NAME: forms | |
NAMESPACE: ${{ secrets.OPENSHIFT_ENV_NAMESPACE }} | |
FORMIO_SOURCE_REPO_TAG: ${{ inputs.formioTag }} | |
HOST_PREFIX: ${{ secrets.HOST_PREFIX }} | |
MONGODB_URI: ${{ secrets.MONGODB_URI }} | |
FORMIO_ROOT_EMAIL: ${{ secrets.FORMS_SA_USER_NAME }} | |
FORMIO_ROOT_PASSWORD: ${{ secrets.FORMS_SA_PASSWORD }} | |
DOMAIN_PREFIX: ${{ vars.DOMAIN_PREFIX }} | |
TLS_CERTIFICATE: ${{ secrets.TLS_CERTIFICATE }} | |
TLS_KEY: ${{ secrets.TLS_KEY }} | |
TLS_CA_CERTIFICATE: ${{ secrets.TLS_CA_CERTIFICATE }} | |
steps: | |
- name: Install CLI tools from OpenShift Mirror | |
uses: redhat-actions/openshift-tools-installer@v1 | |
with: | |
oc: "4" | |
- name: Print env | |
run: | | |
echo NAMESPACE: $NAMESPACE | |
echo HOST_PREFIX: $HOST_PREFIX | |
echo OC CLI Version: $(oc version) | |
# Checkout the PR branch | |
- name: Checkout Target Branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref_name }} | |
# Log in to OpenShift. | |
- name: Log in to OpenShift | |
run: | | |
oc login --token=${{ secrets.SA_TOKEN }} --server=${{ vars.OPENSHIFT_CLUSTER_URL }} | |
# Deploy Forms | |
- name: Deploy Forms server | |
working-directory: "./devops/" | |
run: | | |
make oc-deploy-forms |