1
0
mirror of synced 2025-12-30 03:01:36 -05:00

Cleanup preview env workflow variables (#25160)

* cleanup staging action vars, prep for OS deploy workflow

* fix app_url
This commit is contained in:
Mike Surowiec
2022-02-09 09:12:26 -06:00
committed by GitHub
parent 73f680106e
commit e2a35b3c38
5 changed files with 17 additions and 18 deletions

View File

@@ -36,7 +36,7 @@ for (const file of articleFiles) {
const sourceUrl = file.blob_url
const fileName = file.filename.slice(pathPrefix.length)
const fileUrl = fileName.slice(0, fileName.lastIndexOf('.'))
const previewLink = `https://${APP_URL}/${fileUrl}`
const previewLink = `${APP_URL}/${fileUrl}`
const productionLink = `https://docs.github.com/${fileUrl}`
let markdownLine = ''

View File

@@ -12,8 +12,8 @@
[[ -z $GITHUB_ENV ]] && { echo "Missing GITHUB_ENV. Exiting."; exit 1; }
[[ -z $APP_NAME_SEED ]] && { echo "Missing APP_NAME_SEED. Exiting."; exit 1; }
RESOURCE_GROUP="docs-nonprod"
echo "RESOURCE_GROUP=${RESOURCE_GROUP}" >> $GITHUB_ENV
PREVIEW_ENV_LOCATION="eastus"
echo "PREVIEW_ENV_LOCATION=${PREVIEW_ENV_LOCATION}" >> $GITHUB_ENV
REPO_NAME="${GITHUB_REPOSITORY#*\/}"
echo "REPO_NAME=${REPO_NAME}" >> $GITHUB_ENV
@@ -30,7 +30,7 @@ APP_SHA=$(echo -n "${APP_NAME_SEED}-${APP_NAME_BASE}" | sha1sum | cut -c1-6)
APP_NAME="${APP_NAME_BASE}-${APP_SHA}"
echo "APP_NAME=${APP_NAME}" >> $GITHUB_ENV
APP_URL="https://${APP_NAME}.eastus.azurecontainer.io"
APP_URL="https://${APP_NAME}.${PREVIEW_ENV_LOCATION}.azurecontainer.io"
echo "APP_URL=${APP_URL}" >> $GITHUB_ENV
IMAGE_REPO="${GITHUB_REPOSITORY}/pr-${PR_NUMBER}"