Closed samwaseda closed 1 month ago
I'm testing it here but so far it's not working.
I'm on mobile, but it looks like the test location needs the "uses" clause nested inside the regular "steps" field; take a look at pyiron workflow or some of the actions reusable workflows for something to mimic
The other ones use yml
files from .github/workflow/xyz.yml
. Should I make a file there?
No, just invoke it like a usual action invocation: https://github.com/pyiron/actions/blob/606379c4edf66e4fcd5c44dfd03cc1b5f453288b/.github/workflows/release.yml#L21
Showing my work: I grabbed the github.token
recommendation from ChatGPT, but it looks super familiar and I was hunting for that answer, so I think I read it in the docs. The shell
lines are just copy-pasted from the other places we use the shell.
Alternatively, we could take the token as explicit input like the checkout action does:
Actually, that's probably wiser -- we might get away with secrets being automatically inherited when we use the action inside the pyiron org, but it is just generally a great action and we want it available globally.
https://github.com/pyiron/elaston/pull/18#issuecomment-2287925789
But don't merge yet, let's try from a repo outside the org to make sure the secret still passes
Hmm, runs but doesn't fail hard when I try it in my own namespace: https://github.com/liamhuber/action-test/actions/runs/10382454910/job/28745564689?pr=2
EDIT: runs but doesn't work, critically
Even with the token getting passed in, I'm still getting the same access error from outside the org:
{
"message": "Resource not accessible by integration",
"documentation_url": "https://docs.github.com/rest/issues/issues#update-an-issue",
"status": "403"
}
I've got to go to bed, but I'll be available tomorrow at some point in the AM to take another look
Ahh, ok, the problem was on the side of the repo, not the side of the action! I hadn't configured the repo to allow actions to modify stuff:
With that done it's working fine!
I want to try:
actions/checkout
)set-output
Yeah I thought about the first point. For the second point I got the feeling that it’s more important to have the tag in the title than as a label so I guess we can leave it for now.
I did more or less what @liamhuber said here