ms-teams-deploy-card
ms-teams-deploy-card copied to clipboard
Adding job-name in order to evaluate correct job_id/name
Hi All,
Currently, when we set the value jobs.<job_id>.name
this replaces the JOB NAME within workflowJobs.data.jobs
list.
During the validation, we use the GITHUB_JOB environment variable to check the job, and this one does not change.
const job = workflowJobs.data.jobs.find(
(job: Octokit.ActionsListJobsForWorkflowRunResponseJobsItem) =>
job.name === process.env.GITHUB_JOB
);
...so the job returns null.
I also created this issue to investigate this problem: https://github.community/t/job-job-id-name-changes-job-id-field/121965
In order to keep this working with multiple jobs (explicit created or using strategy.matrix.spec
) in the same workflow I suggest we create a new field job-name where you can customise the name and validate it correctly
Please let me know if this make sense.
Re #22
Hi @femrtnz, thank you so much for the fix. Unfortunately, we must not redeclare the name of the job twice. I'm currently doing a fix now, and I see that GITHUB_JOB is not in the official document anymore. Moreover, I also see that @octokit/rest has changed a lot, so I'm upgrading it.
Any progress on this?
Hi all, any progress or updates on this?