GitHub Action
Branch mapper
v2.0.1
Latest version
Parses branch name and optionally maps to environment name
- uses: alexrogalskiy/github-actions/github-action-branch-mapper@master
with:
github-ref: ${{ github.ref }}
map: ${{ toJSON({ dev: 'staging', production: 'production', '.*': 'sandbox' }) }}
Outputs:
environment
- environment name
Run locally:
yarn run_action --action github-ref-to-env --github-ref refs/heads/my/branch-name --map '{ "dev": "staging", ".*": "sandbox" }'