-
Notifications
You must be signed in to change notification settings - Fork 380
Improvements to deployments #615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
ee08d3a
c790151
8355030
f19d79f
e487791
25e9502
de55983
5240c9b
2a1b9a3
8918cd2
fe262cb
80d841b
084f0d0
cac41c4
745ca0e
f77a610
87662fa
4970fbe
e26cc72
29ade6f
8db0511
b7a7229
1cff976
6cbdb04
0b15816
ae8a473
e6d5025
444ec85
8041a01
b03b6d7
a12e0d4
98649f2
b2e710a
c54a544
c80ff43
40473cc
038cf8f
c25211f
304e642
4744c76
5c8b3ab
2a51c92
61213b9
e431bdf
895986c
3fe506e
585c02d
c46f595
65c64d1
e96ac82
2be9c2f
5f50639
e0cf883
b27783e
66a4114
3426aca
92ad3a7
7d75738
d5b8b7f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,21 @@ jobs: | |
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Debug Trigger Conditions | ||
| env: | ||
| EVENT_NAME: ${{ github.event_name }} | ||
| IS_PR: ${{ github.event.issue.pull_request != '' }} | ||
| COMMENT: ${{ github.event.comment.body }} | ||
| PR_NUMBER: ${{ github.event.issue.number }} | ||
| run: | | ||
| echo "Debug information for delete-review-app command:" | ||
| echo "Event name: $EVENT_NAME" | ||
| echo "Is PR: $IS_PR" | ||
| echo "Comment body: $COMMENT" | ||
| echo "PR number: $PR_NUMBER" | ||
| echo "Raw event payload:" | ||
| echo '${{ toJSON(github.event) }}' | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Limit debug information exposure. Similar to the help command workflow, consider limiting the exposure of sensitive information in debug logs. run: | echo "Debug information for delete-review-app command:" echo "Event name: $EVENT_NAME" echo "Is PR: $IS_PR" echo "Comment body: $COMMENT" echo "PR number: $PR_NUMBER" - echo "Raw event payload:" - echo '${{ toJSON(github.event) }}' + # Log only necessary fields + echo "Event type: ${{ github.event.type }}" + echo "Repository: ${{ github.repository }}" 📝 Committable suggestion
Suggested change
- name: Debug Trigger Conditions
env:
EVENT_NAME: ${{ github.event_name }}
IS_PR: ${{ github.event.issue.pull_request != '' }}
COMMENT: ${{ github.event.comment.body }}
PR_NUMBER: ${{ github.event.issue.number }}
run: |
echo "Debug information for delete-review-app command:"
echo "Event name: $EVENT_NAME"
echo "Is PR: $IS_PR"
echo "Comment body: $COMMENT"
echo "PR number: $PR_NUMBER"
echo "Raw event payload:"
echo '${{ toJSON(github.event) }}'
- name: Debug Trigger Conditions
env:
EVENT_NAME: ${{ github.event_name }}
IS_PR: ${{ github.event.issue.pull_request != '' }}
COMMENT: ${{ github.event.comment.body }}
PR_NUMBER: ${{ github.event.issue.number }}
run: |
echo "Debug information for delete-review-app command:"
echo "Event name: $EVENT_NAME"
echo "Is PR: $IS_PR"
echo "Comment body: $COMMENT"
echo "PR number: $PR_NUMBER"
# Log only necessary fields
echo "Event type: ${{ github.event.type }}"
echo "Repository: ${{ github.repository }}"
|
||
| - name: Get PR number | ||
| id: pr | ||
| uses: actions/github-script@v7 | ||
|
|
@@ -37,6 +52,20 @@ jobs: | |
|
|
||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Validate Required Secrets | ||
| run: | | ||
| missing_secrets=() | ||
| for secret in "CPLN_TOKEN_STAGING" "CPLN_ORG_STAGING"; do | ||
| if [ -z "${!secret}" ]; then | ||
| missing_secrets+=("$secret") | ||
| fi | ||
| done | ||
|
|
||
| if [ ${#missing_secrets[@]} -ne 0 ]; then | ||
| echo "❌ Required secrets are not set: ${missing_secrets[*]}" | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Setup Environment | ||
| uses: ./.github/actions/setup-environment | ||
|
|
||
|
|
@@ -55,9 +84,11 @@ jobs: | |
|
|
||
| - name: Delete Review App | ||
| uses: ./.github/actions/delete-control-plane-app | ||
| with: | ||
| app_name: ${{ env.APP_NAME }} | ||
| org: ${{ env.CPLN_ORG }} | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| env: | ||
| APP_NAME: ${{ env.APP_NAME }} | ||
| CPLN_ORG: ${{ secrets.CPLN_ORG }} | ||
| CPLN_TOKEN: ${{ secrets.CPLN_TOKEN }} | ||
|
|
||
| - name: Update Delete Status | ||
|
|
||