You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/10/10 07:49:35 UTC

[GitHub] [shardingsphere] taojintianxia commented on issue #21402: investigation : is it possible to set up a global constant cross all workflows

taojintianxia commented on issue #21402:
URL: https://github.com/apache/shardingsphere/issues/21402#issuecomment-1272912648

   there is one way could share the constant between workflows:
   1. store environment variables in an .env file like this:
   ```
   FOO=bar
   ```
   
   2. Then you can write code to append data from that file to `$GITHUB_ENV`:
   
   ```
   name: CI
   
   on:
     workflow_dispatch:
   
   jobs:
     foo:
       runs-on: ubuntu-latest
   
       steps:
         - uses: actions/checkout@v3
         - run: cat .env >> $GITHUB_ENV
   
         - name: Use the value
           run: echo $FOO
   ```
   3. You'll need to do cat .env >> $GITHUB_ENV (and use actions/checkout) for each job where you need to access env vars from that file.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org