0

I want to create a plugin for Github Actions that calculates stuff based on an Azure Region (I can map it from whatever system for location Github is using). Hence, I need two pieces of information:

  • How to get a location in which a pipeline is run?

  • How fine-grained the location is? Are all steps within a job running in the same location? Are all jobs inside workflow running in the same location?

The question is for both Github hosted runner and a self-hosted runner.

MilaHalina
  • 138
  • 6

1 Answers1

0

Not sure what is it plugin for Github Actions - may be you mean you want to create a new Github Action ? Anyway - to your question:

How to get a location in which a pipeline is run?

Actually, this folder or path depends on where the Github runner is installed. For example when you install self hosted Github runner you could choose a folder where to extract and run-from this runner

How fine-grained the location is? Are all steps within a job running in the same location? Are all jobs inside workflow running in the same location?

Yes - each job has a jobs.<job_id>.runs-on attribute and you could define a target runner where this job will be run. It could be your own self-hosted runner or Github default runner. It depends on what you put in this field. All steps from the same job run at the same runner where this job is defined.

Alex F
  • 3,180
  • 2
  • 28
  • 40