Use EDGE_APP_ID for stage and production deploys - #17
Conversation
Set STAGE_EDGE_APP_ID and PRODUCTION_EDGE_APP_ID repo variables and pass them through to the initialize/update actions as edge_app_id, falling back from an EDGE_APP_ID environment secret so this upgrades cleanly once one is set. Drop the id from screenly.yml and delete screenly_qc.yml since a single manifest is now used regardless of environment. Pin the edge-apps-actions ref to a commit until v26.9.0 can be tagged.
There was a problem hiding this comment.
🟡 Changes recommended
The production initialization workflow can incorrectly fall back to the stage Edge App ID if the production variable is unset, risking operations against the wrong environment.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates the Edge App deployment/initialization workflows to use environment-specific Edge App IDs (stage vs production) passed into Screenly’s GitHub Actions, while removing hardcoded IDs from manifests to allow a single manifest across environments.
Changes:
- Removed the
idfromscreenly.ymland deletedscreenly_qc.ymlto standardize on one manifest. - Updated GitHub workflows to pass
edge_app_idfrom repo variables (with a secret fallback) and pinnededge-apps-actionsto a commit. - Added local
.envsupport (.env.example) and ignored.envin git.
File summaries
| File | Description |
|---|---|
screenly.yml |
Removes the hardcoded manifest id to enable a single manifest across environments. |
screenly_qc.yml |
Deleted QC-specific manifest file as it’s no longer needed. |
.gitignore |
Ignores .env to prevent committing local secrets/config. |
.github/workflows/update-edge-app.yml |
Passes stage/production edge_app_id via vars/secrets and pins the action revision. |
.github/workflows/initialize-edge-app.yml |
Adds edge_app_id wiring during initialization and pins the action revision. |
.env.example |
Documents local EDGE_APP_ID override for CLI usage. |
Review details
- Files reviewed: 5/6 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…nv.example - Only fall back to the stage variable when the target environment is stage - Remove .env.example since the CLI doesn't load .env files
There was a problem hiding this comment.
🟡 Changes recommended
The edge_app_id fallback order in the workflows contradicts the PR’s stated migration path and can select the wrong ID when both secret and variables are present.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 4/5 changed files
- Comments generated: 3
- Review effort level: Lite
There was a problem hiding this comment.
🟡 Changes recommended
It introduces a visible temporary UI marker in index.html and the initialize workflow’s edge_app_id expression can evaluate to boolean false instead of a string.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
.github/workflows/initialize-edge-app.yml:41
- This expression can evaluate to the boolean
false(e.g., if the selected environment's repo variable is unset/empty), which would pass a non-stringedge_app_idto the action. Add a final fallback (e.g.,|| '') so the value is always a string and avoid accidental type surprises.
- Files reviewed: 5/6 changed files
- Comments generated: 1
- Review effort level: Lite
This reverts commit 2fb6165.
There was a problem hiding this comment.
🟢 Approval recommended
The workflow and manifest updates align with the described deployment strategy, with only a minor readability nit in one expression.
Review details
Suppressed comments (1)
.github/workflows/initialize-edge-app.yml:41
- The
edge_app_idexpression works, but the nested parentheses make it harder to read and reason about. You can simplify it without changing the precedence/safety (it will still resolve tofalseif the environment-specific var is missing for the selected environment).
edge_app_id: ${{ secrets.EDGE_APP_ID || (inputs.environment == 'production' && vars.PRODUCTION_EDGE_APP_ID || (inputs.environment == 'stage' && vars.STAGE_EDGE_APP_ID)) }}
- Files reviewed: 4/5 changed files
- Comments generated: 0 new
- Review effort level: Lite
STAGE_EDGE_APP_IDandPRODUCTION_EDGE_APP_IDrepo variables and pass them through to theinitialize/updateactions asedge_app_id. AnEDGE_APP_IDenvironment secret takes precedence when set, with these variables as the fallback until one exists, so switching to Environment secrets later needs no workflow changes.idfromscreenly.ymland deletedscreenly_qc.ymlsince a single manifest is now used regardless of environment.edge-apps-actionsto a commit for now, sincev26.9.0can't be tagged there until a repo ruleset is adjusted. Will switch to the tag once it exists.