Skip to content

Support global environment variables #25758

Answered by chrispat
DaanDeMeyer asked this question in Actions
Discussion options

You must be logged in to vote

We have an update coming to the language to enable you to sepcify an ENV: key at the job or workflow level.  With that you will be able to do the following:

jobs:
  build:
    strategy:
      matrix:
        compiler: [gcc-6, gcc-7]
    env:
      CC: ${{ matrix.compiler }}
    steps:
      .....

and all steps will have the CC environmnt variable defined when they are run.  I don’t want to arbitrarily add all variables to the environment as that can result in a bloated environment and would likely require some way to negate that behavior. 

Update we now support workflow and job level environment variables https://github.blog/changelog/2019-10-01-github-actions-new-workflow-syntax-features/

Replies: 18 comments

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
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
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
Labels
None yet
10 participants