Jobs run in parallel by default. To run jobs sequentially, you can define dependencies on other jobs using the jobs.<job_id>.needs keyword. For example:
In this example, job1 must complete successfully before job2 begins, if job1 fails, the job2 will not begin.
Jobs are executed on individual VM, you can transfer the variable value to the next job which needs the previous one.
‘set-ouput’ in previous job and get via jobs.<jobs_id>.outputs. in the 2nd job, please check the sample here for more details.