Developers can trigger production deploys manually with a chosen version.
BeginnerScenarioGitHub Actions
Answer
Situation read → On-demand deploy with inputs.
What I'd do →
on:
workflow_dispatch:
inputs:
version:
description: Image tag to deploy
required: true
environment:
type: choice
options: [staging, production]
Use environment: ${{ inputs.environment }} so approvals apply, and validate the version exists in the registry before deploying.
Why → Typed inputs reduce mistakes, and environments keep approvals enforced.
Interview tip → Never interpolate inputs.* directly into shell; pass through env.
More on GitHub Actions
What are workflows, jobs, steps and actions in GitHub Actions?BeginnerWhat events can trigger a workflow?BeginnerWhat is the difference between `pull_request` and `pull_request_target`?AdvancedWhat is a runner, and how do GitHub-hosted and self-hosted runners differ?BeginnerHow do you pass data between steps and between jobs?IntermediateHow does a build matrix work?Intermediate