-
Notifications
You must be signed in to change notification settings - Fork 374
[codex] Regenerate cpflow review app flow #735
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 all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -8,7 +8,7 @@ on: | |||||||||
| # deploy branches unless `cpflow generate-github-actions --staging-branch BRANCH` | ||||||||||
| # was used. If STAGING_APP_BRANCH is later changed in repository variables, keep | ||||||||||
| # this list in sync so pushes to that branch actually trigger the workflow. | ||||||||||
| branches: ["master"] | ||||||||||
| branches: ["main", "master"] | ||||||||||
|
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. Listing both If this repo will always use |
||||||||||
| workflow_dispatch: | ||||||||||
|
|
||||||||||
| permissions: | ||||||||||
|
|
@@ -17,7 +17,7 @@ permissions: | |||||||||
| env: | ||||||||||
| APP_NAME: ${{ vars.STAGING_APP_NAME }} | ||||||||||
| CPLN_ORG: ${{ vars.CPLN_ORG_STAGING }} | ||||||||||
| STAGING_APP_BRANCH: ${{ vars.STAGING_APP_BRANCH || 'master' }} | ||||||||||
| STAGING_APP_BRANCH: ${{ vars.STAGING_APP_BRANCH }} | ||||||||||
|
|
||||||||||
| concurrency: | ||||||||||
| group: cpflow-deploy-staging-${{ github.ref_name }} | ||||||||||
|
|
@@ -56,8 +56,6 @@ jobs: | |||||||||
| - name: Checkout repository | ||||||||||
| if: steps.check-branch.outputs.is_deployable == 'true' | ||||||||||
| uses: actions/checkout@v4 | ||||||||||
|
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. The
Suggested change
|
||||||||||
| with: | ||||||||||
| persist-credentials: false | ||||||||||
|
|
||||||||||
| - name: Validate required secrets and variables | ||||||||||
| if: steps.check-branch.outputs.is_deployable == 'true' | ||||||||||
|
|
@@ -93,8 +91,6 @@ jobs: | |||||||||
|
|
||||||||||
| - name: Build Docker image | ||||||||||
| uses: ./.github/actions/cpflow-build-docker-image | ||||||||||
| env: | ||||||||||
| CPLN_TOKEN: ${{ secrets.CPLN_TOKEN_STAGING }} | ||||||||||
| with: | ||||||||||
| app_name: ${{ env.APP_NAME }} | ||||||||||
| org: ${{ vars.CPLN_ORG_STAGING }} | ||||||||||
|
|
@@ -105,7 +101,7 @@ jobs: | |||||||||
|
|
||||||||||
| deploy: | ||||||||||
| needs: [validate-branch, build] | ||||||||||
| if: needs.validate-branch.outputs.is_deployable == 'true' && needs.build.result == 'success' | ||||||||||
| if: needs.validate-branch.outputs.is_deployable == 'true' | ||||||||||
|
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.
GitHub Actions documents that when a job with |
||||||||||
| runs-on: ubuntu-latest | ||||||||||
| timeout-minutes: 30 | ||||||||||
| steps: | ||||||||||
|
|
@@ -130,7 +126,6 @@ jobs: | |||||||||
|
|
||||||||||
| - name: Deploy staging image | ||||||||||
| env: | ||||||||||
| CPLN_TOKEN: ${{ secrets.CPLN_TOKEN_STAGING }} | ||||||||||
| RELEASE_PHASE_FLAG: ${{ steps.release-phase.outputs.flag }} | ||||||||||
| shell: bash | ||||||||||
| run: | | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy creates GitHub deployments but delete never cleans them
Low Severity
The deploy workflow still creates GitHub deployment records (via
createDeploymentandcreateDeploymentStatus) and retains thedeployments: writepermission, but the delete workflow removed both thedeployments: writepermission and the "Mark GitHub deployment inactive" step. This asymmetry means deployment records are created on every review-app deploy but never markedinactivewhen the review app is deleted or the PR is closed, causing stale environment entries to accumulate on the repository's GitHub Environments page.Additional Locations (1)
.github/workflows/cpflow-deploy-review-app.yml#L278-L303Reviewed by Cursor Bugbot for commit 9d3b37e. Configure here.