Skip to content

How to set a env value as the value for another env? #40

Answered by FranzDiebold
mrmartineau asked this question in Q&A
Discussion options

You must be logged in to vote

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?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mrmartineau
Comment options

Answer selected by mrmartineau
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants