Skip to content

Commit

Permalink
[DOP-4003]: Use custom webhook for initial feature branch deploy (#941)
Browse files Browse the repository at this point in the history
* [DOP-4003]: Add test workflow

* [DOP-4003]: Use correct path

* [DOP-4003]: Use branch action path

* [DOP-4003]: Comment out extra steps temporarily

* [DOP-4003]: Move test action

* [DOP-4003]: Add github token

* [DOP-4003]: Add custom webhook to update feature branch for testing

* [DOP-4003]: Add meaningless commit to trigger webhook deploy

* [DOP-4003]: Update path filter

* [DOP-4003]: Add meaningless commit to trigger webhook deploy

* [DOP-4003]: Add meaningless commit to trigger webhook deploy

* [DOP-4003]: Add meaningless commit to trigger webhook deploy

* [DOP-4003]: Add meaningless commit to trigger webhook deploy

* [DOP-4003]: Add meaningless commit to trigger webhook deploy

* [DOP-4003]: Add meaningless commit to trigger webhook deploy

* [DOP-4003]: Move webhook comment action to correct workflow

* [DOP-4003]: Clean up
  • Loading branch information
branberry authored Dec 1, 2023
1 parent 1c063bb commit 9a65a04
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 27 deletions.
14 changes: 0 additions & 14 deletions .github/scripts/webhook-pr-comment.js

This file was deleted.

13 changes: 1 addition & 12 deletions .github/workflows/deploy-feature-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,6 @@ jobs:
npm run deploy:feature:stack -- -c env=stg -c customFeatureName=enhancedApp-stg-${{github.head_ref}} auto-builder-stack-enhancedApp-stg-${{github.head_ref}}-worker
npm run deploy:feature:stack -- -c env=stg -c customFeatureName=enhancedApp-stg-${{github.head_ref}} auto-builder-stack-enhancedApp-stg-${{github.head_ref}}-webhooks --outputs-file outputs.json
- name: Get Webhook URL
uses: actions/github-script@v6
id: webhook
env:
GIT_BRANCH: ${{github.head_ref}}
with:
script: |
const script = require('./.github/scripts/webhook-pr-comment.js');
return script()
result-encoding: string
- name: Comment on PR
if: steps.webhook.outputs.result != ''
run: gh pr comment ${{github.event.number}} --body "The URL for your feature branch webhook is ${{steps.webhook.outputs.result}}"
uses: mongodb/docs-worker-actions/comment-pr@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion .github/workflows/update-feature-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ jobs:
npm ci
npm run deploy:feature:stack -- -c env=stg -c customFeatureName=enhancedApp-stg-${{github.head_ref}} \
auto-builder-stack-enhancedApp-stg-${{github.head_ref}}-webhooks
- name: Update Worker Stack
if: steps.filter.outputs.worker == 'true'
run: |
Expand Down

0 comments on commit 9a65a04

Please sign in to comment.