How to set a env value as the value for another env? #40
-
I'd like to use one of the provided env vars (e.g. jobs:
build_and_preview:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: FranzDiebold/github-env-vars-action@v2
- name: Install dependencies
run: yarn --prefer-offline
- name: Deploy previews
id: deploy_firebase_hosting_channel
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_DFX_STAGING }}'
projectId: dfx-staging
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
VITE_API_BASE_PATH: '${{ secrets.API_BASE_PATH_STAGING }}'
VITE_GIT_SHA: $CI_SHA_SHORT
VITE_GIT_REF: $CI_REF_NAME The 2 env vars that I'd like to be set are Can you help? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @mrmartineau, I am happy to help! 🚀 What about the following? jobs:
build_and_preview:
runs-on: ubuntu-latest
steps:
...
- name: Deploy previews
...
env:
...
VITE_GIT_SHA: "${{ env.CI_SHA_SHORT }}"
VITE_GIT_REF: "${{ env.CI_REF_NAME }}" You can see the results on this branch with actions output here. Does this solve your problem? |
Beta Was this translation helpful? Give feedback.
Hi @mrmartineau,
I am happy to help! 🚀
What about the following?
You can see the results on this branch with actions output here.
Does this solve your problem?