GitHub Actions Integration
Run GitHub Actions workflows locally using act to test workflows without pushing to GitHub. Workspace Tasks provides a rich interface for discovering and executing workflows with full input support.
Table of Contents
Overview
Workspace Tasks automatically discovers all GitHub Actions workflow files in .github/workflows/*.yml and exposes them as runnable tasks. Each workflow appears with its individual jobs and supported trigger events.
Task Tree Structure
GitHub Actions
βββ Build & Test
βββ Run Workflow (push)
βββ Run Workflow (workflow_dispatch) β Shows input prompts
βββ Run Job: build
Requirements
- act β Must be installed on your system
- Docker β Must be running (act uses containers)
- Configure
workspaceTasks.applicationPath.actif act is not in your systemPATH
Features
- Automatic Discovery β Scans
.github/workflows/*.ymlfiles - Event Support β Run workflows for
push,pull_request,workflow_dispatch, and custom events - Job Execution β Run individual jobs from multi-job workflows
- Input Prompts β Interactive prompts for
workflow_dispatchinputs with validation - Status Indicators β Real-time visual feedback during execution
Configuration
Configure act in your VS Code settings.json:
{
// Path to act executable
"workspaceTasks.applicationPath.act": "act",
// Environment files
"workspaceTasks.act.envFile": ".env",
"workspaceTasks.act.secretsFile": ".act.secrets",
"workspaceTasks.act.variablesFile": ".act.vars",
// Inline variables
"workspaceTasks.act.variables": {
"ENVIRONMENT": "development",
"VERSION": "1.0.0"
}
}
workspaceTasks.applicationPath.act
Type: string Default: "act" Scope: resource
Path to the act executable. On Windows, if the path ends with act, .exe will be appended automatically. ~/ is expanded to the userβs home directory.
{
// Use an act binary bundled inside the project
"workspaceTasks.applicationPath.act": "tools\\act\\act.exe"
}
workspaceTasks.act.envFile
Type: string Default: ""
Path to a .env file containing environment variables for act. See the Act documentation for file format details.
workspaceTasks.act.secretsFile
Type: string Default: ""
Path to a secrets file for act. Secrets are used to provide sensitive values to workflows without exposing them in configuration.
workspaceTasks.act.variablesFile
Type: string Default: ""
Path to a variables file for act.
workspaceTasks.act.variables
Type: object Default: {}
Inline key/value pairs passed as variables to act runs.
Usage Example
Given this workflow at .github/workflows/build.yml:
name: Build & Test
on:
push:
workflow_dispatch:
inputs:
environment:
description: 'Deployment environment'
required: true
default: 'staging'
type: choice
options: [development, staging, production]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm run build
Workspace Tasks will display:
GitHub Actions
βββ Build & Test
βββ Run Workflow (push)
βββ Run Workflow (workflow_dispatch)
βββ Run Job: build
When you run βRun Workflow (workflow_dispatch)β, Workspace Tasks will prompt you to fill in the environment input before executing.
Tips
- Store secrets in a
.secretsfile and add it to.gitignoreto keep credentials out of source control - Test
workflow_dispatchinputs locally before pushing to verify your workflow logic - Run individual jobs to debug specific workflow steps without re-running the entire workflow
- Use the
workspaceTasks.act.variablessetting for environment-specific values that change between runs
Next Steps
- Supported Task Types β All supported task types
- DevOps & Containers β Docker, Docker Compose, and GitHub Actions overview
- Configuration Reference β Full settings reference
- GitHub Actions Settings (Act) β Detailed act configuration reference
- act Documentation β Official act documentation
- Enabling / Disabling Task Types β Control which task types are active