Skip to content

Commit

Permalink
Tidy up of script calling
Browse files Browse the repository at this point in the history
  • Loading branch information
hellais committed Feb 5, 2024
1 parent 1e7488d commit 72c01d1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/deploy_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const script = require('./scripts/ghactions/comment-on-pr.js');
const commentTitle = "Ansible Run Output";
const ansiblePlaybookOutput = `${{ steps.playbook.outputs.ansible_playbook}}`;
const parts = ansiblePlaybookOutput.split("/^PLAY RECAP \*+/");
Expand Down Expand Up @@ -84,6 +83,9 @@ jobs:
| Workflow | ${{ github.workflow }} |
| Last updated | ${(new Date()).toUTCString()} |
`;
// Call the script to write the comment
const script = require('./scripts/ghactions/comment-on-pr.js');
await script({github, context, core, commentTitle, commentBody});
terraform:
Expand Down Expand Up @@ -166,7 +168,6 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const script = require('./scripts/ghactions/comment-on-pr.js');
const terraformPlanOutput = `${{ steps.plan.outputs.terraform_plan }}`;
const terraformApplyOutput = `${{ steps.apply.outputs.terraform_apply }}`;
Expand Down Expand Up @@ -218,4 +219,7 @@ jobs:
| Workflow | ${{ github.workflow }} |
| Last updated | ${ (new Date()).toUTCString() } |
`;
// Call the script to write the comment
const script = require('./scripts/ghactions/comment-on-pr.js');
await script({github, context, core, commentTitle, commentBody});

0 comments on commit 72c01d1

Please sign in to comment.