jamesconsultingllc/Resolve Azure SWA Environment
Resolve deployment slot and source environment from branch name. Supports GitFlow patterns.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Maintainedlast commit Dec 19, 2025
- License
- MIT
Pinned Snippet
uses: jamesconsultingllc/resolve-swa-environment-action@78b07725410b7bae9e35c6ff1aa57fcedecd84a4 # v1.0.1tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| branch | Branch name to resolve. If not provided, auto-detects from git or GITHUB_REF_NAME. | no | "" |
| branch-mappings | JSON object mapping branch patterns to environments. Supports glob patterns. Default (GitFlow): {"main":"production","master":"production","develop":"development","release/*":"staging","feature/*":"$sanitized","hotfix/*":"$sanitized"} Use "$sanitized" as value to auto-generate slot name from branch. | no | "" |
| parent-branch-mappings | JSON object mapping branch patterns to their parent environment for source detection. Default (GitFlow): {"feature/*":"development","hotfix/*":"production","release/*":"development"} | no | "" |
| detect-source | Whether to detect the source environment (for copying settings). Set to false if only target is needed. | no | true |
Outputs
| name | description |
|---|---|
| branch | The resolved branch name |
| target-environment | The target environment/slot name for deployment |
| target-slot | Alias for target-environment (for SWA deployment_environment) |
| source-environment | The source environment to copy settings from |
| is-preview | Whether this is a preview environment (feature/hotfix/release branch) |
| is-production | Whether this is the production environment |
| sanitized-branch | The sanitized branch name (alphanumeric, lowercase, max 16 chars) |