github-actions-parser
github-actions-parser copied to clipboard
runs-on can contain any custom label
Per the docs:
if you have a job that requires a specific type of graphics hardware, you can create a custom label called
gpu... This example shows a job that combines default and custom labels:runs-on: [self-hosted, gpu]
But that makes vscode-github-actions complain:
'gpu' is not in the list of allowed values
presumably because gpu isn't in this list:
https://github.com/cschleiden/github-actions-parser/blob/a4679ecb4f0c38990f1c4f9a558928bc2b45ce44/src/lib/workflowschema/workflowSchema.ts#L152-L155
I fear the existence of custom labels means that list ⬆️ will have to go away? 😬
That's the default list, the API calls below: https://github.com/cschleiden/github-actions-parser/blob/a4679ecb4f0c38990f1c4f9a558928bc2b45ce44/src/lib/workflowschema/workflowSchema.ts#L165 try to get the correct set of labels from the runner API.
If that fails, however, something like gpu would not be recognized. I think it would need some kind of intermediate state, if the API call fails, the unrecognized label should get a warning or an information that it's not a default label but that the custom labels could not be retrieved.
Oh interesting, I didn't realize it was that smart!
I now see it isn't picking up our org runner, so that makes sense. Is this token error ⬇️ a clue? Worth a separate issue?
There is a setting for org features, if that's enabled the extension should try to request a token with admin:org scope. Unfortunately there is no simple scope that only allows read of org secrets/runners, so it has to be that one:

But I admit, this is not really the most user friendly part of the extension.
@cschleiden aha, okay so I enabled that, and while I do now see our org secrets I still don't see org runners, but perhaps tellingly this popped up:
Any useful logs I can look at? 🤔