A github action to select correct environments based on scope, e.g. production
or staging
.
Add the following step to your workflow:
- name: 'Select correct scope environment variables'
uses: muchobien/scoped-env@v1
with:
secrets: ${{ toJSON(secrets) }}
scope: PROD
includes: 'FROM_INCLUDES' # optional
exporters: 'env,output' # default, optional
overrides: 'false' # optional, default false (override existing environment variables)
This code is made available under the MIT license.