jamesconsultingllc/Resolve Azure SWA Environment

Resolve deployment slot and source environment from branch name. Supports GitFlow patterns.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Maintainedlast commit Dec 19, 2025
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: jamesconsultingllc/resolve-swa-environment-action@78b07725410b7bae9e35c6ff1aa57fcedecd84a4 # v1.0.1

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
branchBranch name to resolve. If not provided, auto-detects from git or GITHUB_REF_NAME.no""
branch-mappingsJSON 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-mappingsJSON object mapping branch patterns to their parent environment for source detection. Default (GitFlow): {"feature/*":"development","hotfix/*":"production","release/*":"development"} no""
detect-sourceWhether to detect the source environment (for copying settings). Set to false if only target is needed.notrue
namedescription
branchThe resolved branch name
target-environmentThe target environment/slot name for deployment
target-slotAlias for target-environment (for SWA deployment_environment)
source-environmentThe source environment to copy settings from
is-previewWhether this is a preview environment (feature/hotfix/release branch)
is-productionWhether this is the production environment
sanitized-branchThe sanitized branch name (alphanumeric, lowercase, max 16 chars)