From 98fde29ba83177430259318f070115afc0eaf4d4 Mon Sep 17 00:00:00 2001 From: Ardian Luma Date: Fri, 12 Aug 2022 11:26:00 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9E=95:=20Add=20Alias=20URL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- dist/action.js | 1 + package.json | 2 +- src/action.ts | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7ab12ec..c71b239 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Wait for Cloudflare Pages build to finish and send Slack notification ## Usage ```yml - name: Await CF Pages and send Slack notification - uses: arddluma/cloudflare-pages-slack-notification@v2.3 + uses: arddluma/cloudflare-pages-slack-notification@v2.4 with: accountEmail: ${{ secrets.CF_ACCOUNT_EMAIL }} apiKey: ${{ secrets.CF_API_KEY }} @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@v2 - name: Await CF Pages and send Slack notification id: cf-pages - uses: arddluma/cloudflare-pages-slack-notification@v2.3 + uses: arddluma/cloudflare-pages-slack-notification@v2.4 with: accountEmail: ${{ secrets.CF_ACCOUNT_EMAIL }} apiKey: ${{ secrets.CF_API_KEY }} diff --git a/dist/action.js b/dist/action.js index 39d22e4..ae52637 100644 --- a/dist/action.js +++ b/dist/action.js @@ -11427,6 +11427,7 @@ Environment: *${deployment.environment}* Commit: ${import_utils.context.payload.head_commit.url} Actor: *${import_utils.context.actor}* Deployment ID: *${deployment.id}* +Alias URL: ${aliasUrl} Deployment URL: ${deployment.url} Checkout `).then(() => { console.log("Slack message for DEPLOYMENT succedded pipeline sent!"); diff --git a/package.json b/package.json index fc51ebb..2018907 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cf-pages-await", - "version": "2.0.2", + "version": "2.0.4", "description": "Wait for a Cloudflare Pages build to finish and send Slack notification", "main": "index.js", "keywords": [], diff --git a/src/action.ts b/src/action.ts index b3d11c4..6af9dcb 100644 --- a/src/action.ts +++ b/src/action.ts @@ -69,7 +69,7 @@ export default async function run() { core.setOutput('success', deployment.latest_stage.status === 'success' ? true : false); if (deployment.latest_stage.status === 'success' && true) { - slack.send(`:white_check_mark: CloudFlare Pages \`Deployment\` pipeline for project *${project}* \`SUCCEEDED\`!\nEnvironment: *${deployment.environment}*\nCommit: ${context.payload.head_commit.url}\nActor: *${context.actor}*\nDeployment ID: *${deployment.id}*\nDeployment URL: ${deployment.url}\nCheckout `).then(() => { + slack.send(`:white_check_mark: CloudFlare Pages \`Deployment\` pipeline for project *${project}* \`SUCCEEDED\`!\nEnvironment: *${deployment.environment}*\nCommit: ${context.payload.head_commit.url}\nActor: *${context.actor}*\nDeployment ID: *${deployment.id}*\nAlias URL: ${aliasUrl}\nDeployment URL: ${deployment.url}\nCheckout `).then(() => { console.log('Slack message for DEPLOYMENT succedded pipeline sent!'); }).catch((err) => { console.error(err);