Splitting pipeline in multiple yml's and include env var file

I have a long pipeline.yml. I want to split it in multiple yml’s, one for push action, other for pull request merge, other for prerelease, other for release.
And for this I want to share a gloval env var’s file, needed by all the pipelines. Is there any way to include?


Hi @jportasa Thanks for your feedback.
You can try to add the following action in each yaml . This action will get the variables defined in the .env file. Please refer to this simple example for details. Hope it helps.

uses: c-py/action-dotenv-to-setenv@v1
  env-file: .env

Thanks but I need the env vars as global vars in the pipeline, with the solution you say I will have to add your code in each job :frowning:

Hi @jportasa
This action is actually implemented through set-env. Those env variables are available for any actions running next in a job, so it needs to be added in each job as you said.

I recommend that you can report the feature requests here. That will allow you to directly interact with the appropriate engineering team, and make it more convenient for the engineering team to collect and categorize your suggestions.

@jportasa did you ever get a solution to this? I also need to share variables across different pipelines.