ci: add workflow_dispatch trigger (stage only) to update-edge-app.yml#5
Merged
Merged
Conversation
- Add workflow_dispatch with environment input (stage/production) - Update job conditions to handle manual dispatch alongside push events - Update run-name to resolve environment from input or git ref - Fix echo casing in initialize-edge-app.yml to match update workflow
There was a problem hiding this comment.
Pull request overview
Adds a manual (workflow_dispatch) trigger to the Edge App update workflow so operators can explicitly choose the target environment, and aligns log output casing between the update and initialize workflows.
Changes:
- Added
workflow_dispatchwith anenvironmentchoice input (stage/production) toupdate-edge-app.yml. - Updated
run-nameand per-jobifconditions to support manual dispatch alongside branch pushes. - Standardized “Current User/Team” echo casing in both workflows.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/workflows/update-edge-app.yml |
Adds manual dispatch + environment selection; updates run naming and job gating logic. |
.github/workflows/initialize-edge-app.yml |
Normalizes echo output casing to match the update workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
.github/workflows/update-edge-app.yml:30
- With the new
workflow_dispatchtrigger, a user can run this workflow from an arbitrary branch/ref in the UI. That means selectingenvironment: productioncould still check out and deploy the workflow’s selected branch (e.g.development), which risks updating the production Edge App from the wrong code/config. Consider forcingactions/checkoutto usemainfor production dispatches anddevelopmentfor stage dispatches (while keepinggithub.shafor push runs).
if: (github.event_name == 'push' && github.ref == 'refs/heads/development') || (github.event_name == 'workflow_dispatch' && inputs.environment == 'stage')
environment: stage
steps:
- uses: actions/checkout@v6
# TODO: Refactor into Screenly/edge-apps-actions/whoami@v1
.github/workflows/update-edge-app.yml:64
- Same concern as stage: on
workflow_dispatch, the workflow may run from a non-mainref even wheninputs.environment == 'production', but the job will still deploy to theproductionGitHub Environment. This can update production using code/config from the wrong branch. Force checkout tomainfor production dispatch runs (and keepgithub.shafor push runs) to avoid accidental misdeploys.
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'workflow_dispatch' && inputs.environment == 'production')
environment: production
steps:
- uses: actions/checkout@v6
# TODO: Refactor into Screenly/edge-apps-actions/whoami@v1
- Remove environment input; dispatch always targets stage - Simplify run-name to use literal 'stage' for dispatch events - Update deploy-stage condition to match any workflow_dispatch - Remove workflow_dispatch clause from deploy-production condition
salmanfarisvp
approved these changes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mainonly