Created
February 9, 2023 15:41
-
-
Save JoeKleinsorge/58a1c953207f4fd98d77fdfc8401935f to your computer and use it in GitHub Desktop.
Using the Branch Name to select Environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Using the Branch Name to select Environment | |
on: | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
# Run the following steps with the environment | |
# variables based on what branch was chosen | |
environment: ${{ github.ref_name }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Go environment | |
uses: actions/setup-go@v3.5.0 | |
with: | |
# Use environment variable for Go version | |
go-version: ${{ env.GO_VERSION }} | |
# Use environment secret for token | |
token: ${{ secrets.GO_TOKEN }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment