Skip to content

Commit

Permalink
➕: Add Alias URL
Browse files Browse the repository at this point in the history
  • Loading branch information
arddluma committed Aug 12, 2022
1 parent 78a441c commit 98fde29
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions dist/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://dash.cloudflare.com?to=/${accountId}/pages/view/${deployment.project_name}/${deployment.id}|build logs>`).then(() => {
console.log("Slack message for DEPLOYMENT succedded pipeline sent!");
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": [],
Expand Down
2 changes: 1 addition & 1 deletion src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://dash.cloudflare.com?to=/${accountId}/pages/view/${deployment.project_name}/${deployment.id}|build logs>`).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 <https://dash.cloudflare.com?to=/${accountId}/pages/view/${deployment.project_name}/${deployment.id}|build logs>`).then(() => {
console.log('Slack message for DEPLOYMENT succedded pipeline sent!');
}).catch((err) => {
console.error(err);
Expand Down

0 comments on commit 98fde29

Please sign in to comment.