From 158c9eff6d215e988eb56bf926b5e088826ba2e4 Mon Sep 17 00:00:00 2001 From: Matej Vobornik Date: Mon, 28 Oct 2024 13:40:40 +0100 Subject: [PATCH] fix!: Distinguish between "Pleo" env and Github env in deployment (#267) --- .github/workflows/deploy.yml | 12 ++++++++---- reusable-workflows/deploy.yml | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 10c5816..b64564b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,7 +7,11 @@ on: inputs: environment: required: true - description: "Name of the deployment environment" + description: "Name of the deployment environment (product-{dev|staging|production})" + type: string + github_environment: + required: true + description: "Name of the Github deployment environment ({app_name}-{environment})" type: string app_name: required: false @@ -61,7 +65,7 @@ jobs: name: Deploy runs-on: ubuntu-22.04 environment: - name: ${{ inputs.environment }} + name: ${{ inputs.github_environment }} url: ${{ steps.deployment-url.outputs.url }} outputs: deployment_url: ${{ steps.deployment-url.outputs.url }} @@ -148,9 +152,9 @@ jobs: NODE_AUTH_TOKEN: ${{ secrets.GH_REGISTRY_NPM_TOKEN }} SPA_ROOT_DIR: ${{ inputs.root_dir }} SPA_BUNDLE_DIR: ${{ inputs.bundle_dir }} - SPA_ENV: ${{inputs.environment}} + SPA_ENV: ${{ inputs.environment }} SPA_TREE_HASH: ${{ inputs.deploy_hash }} - run: ${{inputs.inject_config_cmd }} + run: ${{ inputs.inject_config_cmd }} - name: Copy Static Files if: ${{ steps.is-version-already-deployed.outputs.is_deployed == 'false'}} diff --git a/reusable-workflows/deploy.yml b/reusable-workflows/deploy.yml index 10c5816..b64564b 100644 --- a/reusable-workflows/deploy.yml +++ b/reusable-workflows/deploy.yml @@ -7,7 +7,11 @@ on: inputs: environment: required: true - description: "Name of the deployment environment" + description: "Name of the deployment environment (product-{dev|staging|production})" + type: string + github_environment: + required: true + description: "Name of the Github deployment environment ({app_name}-{environment})" type: string app_name: required: false @@ -61,7 +65,7 @@ jobs: name: Deploy runs-on: ubuntu-22.04 environment: - name: ${{ inputs.environment }} + name: ${{ inputs.github_environment }} url: ${{ steps.deployment-url.outputs.url }} outputs: deployment_url: ${{ steps.deployment-url.outputs.url }} @@ -148,9 +152,9 @@ jobs: NODE_AUTH_TOKEN: ${{ secrets.GH_REGISTRY_NPM_TOKEN }} SPA_ROOT_DIR: ${{ inputs.root_dir }} SPA_BUNDLE_DIR: ${{ inputs.bundle_dir }} - SPA_ENV: ${{inputs.environment}} + SPA_ENV: ${{ inputs.environment }} SPA_TREE_HASH: ${{ inputs.deploy_hash }} - run: ${{inputs.inject_config_cmd }} + run: ${{ inputs.inject_config_cmd }} - name: Copy Static Files if: ${{ steps.is-version-already-deployed.outputs.is_deployed == 'false'}}