I’m working with GitHub Actions and need to implement a workflow that can pause execution to wait for manual approval or user decision. My current setup uses pull request triggers to start the workflow automatically, but I need human intervention at a specific point.
The flow I’m trying to achieve is:
Workflow starts automatically from PR
Process runs some initial checks
Execution pauses for manual approval
Continues based on user decision
I’m aware that workflow_dispatch allows input parameters when manually triggering workflows, but that doesn’t help since my workflows must start from PR events. I need something that can halt the running workflow and wait for someone to provide approval or make a choice before proceeding.
Has anyone found a solution for this? Maybe there’s an action in the marketplace that handles approval gates, or perhaps there’s a different approach I should consider?
Here’s another approach that works great: set up a manual trigger using repository dispatch events. Your workflow creates an issue or comment when it hits the approval step, then a separate workflow watches for specific comments like ‘/approve’ or ‘/reject’. When someone with proper permissions comments, it triggers the original workflow to continue via repository dispatch. This gives you way more flexibility than environments - you can customize the approval logic and add conditional paths for different approval types. The tradeoff? You’ll need more setup with API calls and token management, but you get granular control over who approves what and when.
i think using environments is a great way! you can set protection rules in repo settings and require approvals before continuing. just reference it in your job and it pauses until someone approves it. it’s been reliable for me in production deployments.