Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ai-moderator.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .github/workflows/auto-triage-issues.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .github/workflows/example-custom-error-patterns.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .github/workflows/workflow-generator.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 38 additions & 1 deletion docs/src/content/docs/patterns/dispatchops.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,50 @@ on:
- medium
- high
default: medium
deploy_target:
description: 'Deployment environment'
required: false
type: environment
default: staging
```

**Supported input types:**
- **`string`** - Free-form text input
- **`boolean`** - True/false checkbox
- **`choice`** - Dropdown selection with predefined options
- **`environment`** - Repository environment selector
- **`environment`** - Dropdown selection of GitHub environments configured in the repository

### Environment Input Type

The `environment` input type provides a dropdown selector populated with environments configured in your repository. This is useful for workflows that need to target specific deployment environments or use environment-specific secrets and protection rules.

**Key characteristics:**
- Automatically populated from environments configured in repository Settings → Environments
- Returns the environment name as a string value
- Can specify a `default` value (must match an existing environment name)
- Does not require an `options` list (populated automatically from repository configuration)
- Does not enforce environment protection rules (see [Environment Approval Gates](#environment-approval-gates) below for that)

**Example usage:**

```yaml
on:
workflow_dispatch:
inputs:
target_env:
description: 'Deployment target'
required: true
type: environment
default: staging
```

Access the selected environment in your workflow markdown:

```markdown
Deploy to the ${{ github.event.inputs.target_env }} environment.
```

**Note:** The `environment` input type only provides a selector for environment names. To enforce environment protection rules (approval gates, required reviewers, wait timers), use the `manual-approval:` field in your workflow frontmatter (see [Environment Approval Gates](#environment-approval-gates) below).

## Security Model

Expand Down
9 changes: 8 additions & 1 deletion docs/src/content/docs/reference/triggers.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ on:
- medium
- high
default: medium
deploy_env:
description: 'Target environment'
required: false
type: environment
default: staging
```

#### Accessing Inputs in Markdown
Expand Down Expand Up @@ -77,7 +82,9 @@ Provide a comprehensive summary with key findings and recommendations.
- `string` - Free-form text input
- `boolean` - True/false checkbox
- `choice` - Dropdown selection with predefined options
- `environment` - Repository environment selector
- `environment` - Dropdown selection of GitHub environments configured in the repository

The `environment` input type automatically populates a dropdown with environments configured in repository Settings → Environments. It returns the environment name as a string and supports a `default` value. Unlike the `manual-approval:` field, using an `environment` input does not enforce environment protection rules—it only provides the environment name as a string value for use in your workflow logic.

### Scheduled Triggers (`schedule:`)

Expand Down
Loading