Skip to content

Double substitution on Github Action - Nested substitution #26419

Discussion options

You must be logged in to vote

Hi @Simran-B thank you for your reply.

Actually, I found the solution not that long ago doing the following:

- name: Set Branch Credentials
  run: |
    BRANCH_NAME=${GITHUB_REF##*/}
    BRANCH_NAME=${BRANCH_NAME^^}
    echo "BRANCH_ENVIRONMENT_NAME=${BRANCH_NAME}_ENVIRONMENT_NAME" >> $GITHUB_ENV
  • name: Deploy
    run: echo ${{ secrets[env.BRANCH_ENVIRONMENT_NAME] }}

Thank you very much!

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants