From 57607f1adc5b0b22780e53cadd55cce115b97a54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Fern=C3=A1ndez?= Date: Thu, 3 Oct 2024 07:11:40 +0000 Subject: [PATCH] ci: extract cf pages deployment url to top level env var --- .github/workflows/__job_messages.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/__job_messages.yml b/.github/workflows/__job_messages.yml index d54216ee8be..d9995c1d226 100644 --- a/.github/workflows/__job_messages.yml +++ b/.github/workflows/__job_messages.yml @@ -24,6 +24,8 @@ on: type: string default: "CFPages-deployment" +env: + CF_PAGES_DEPLOYMENT_URL: https://jf-vue.pages.dev jobs: cf_pages_msg: @@ -36,7 +38,7 @@ jobs: id: compose env: COMMIT: ${{ inputs.commit }} - PREVIEW_URL: ${{ inputs.preview_url != '' && (inputs.branch != 'master' && inputs.preview_url || format('https://jf-vue.pages.dev ({0})', inputs.preview_url)) || 'Not available' }} + PREVIEW_URL: ${{ inputs.preview_url != '' && (inputs.branch != 'master' && inputs.preview_url || format('{0} ({1})', env.CF_PAGES_DEPLOYMENT_URL, inputs.preview_url)) || 'Not available' }} DEPLOY_STATUS: ${{ inputs.in_progress && '🔄 Deploying...' || (inputs.preview_url != '' && '✅ Deployed!' || '❌ Failure. Check workflow logs for details') }} DEPLOYMENT_TYPE: ${{ inputs.branch != 'master' && '🔀 Preview' || '⚙️ Production' }} WORKFLOW_RUN: ${{ !inputs.in_progress && format('**[View build logs](https://github.com/{0}/actions/runs/{1})**', github.repository, github.run_id) || '' }}