6/27/2023 0 Comments Github actions contextsSince the two not are documented to be the same, you might have to resort back to just dumping an event and checking what you actually get. For example, if you run a workflow when a pull request is created, you could look at the webhook payload for pull requests here: I have never seen docs that list all payloads, but I believe you can take inspiration from the webhooks. ![]() If you run a workflow as a result of on: pull_request you'll get a different payload than running it as a result of on: push (etc.). The payload, on the other hand, depends on the event type. I think you want to distinguish between context variables and payloads.Ĭontext variables are available in most cases and exceptions are documented (as you found): Likely there are other context variables that may be very useful, but I can't seem to find a complete list, rather only those that happen to be mentioned and scatter about in various code examples. I can't find documentation for the more deeply nested variables noted above. I have, for example, found this, but it only lists context variables one level down from the github context object. My question is this: Is there any place where the full list of available context variables is documented? However, other than the first two ( github.ref and github.sha) I cannot find the other four in any of the github actions documentation. ![]() I found that the following context variables are available: You can think of them as variables which can be templated into the. while investigating this, I found among various sources (for example, munity, and code examples in the /actions/checkout README file). Contexts are collections of variables that are accessible outside of the run commands. ![]() While investigating how, within github actions, I can diff the "base" version of a specific file in a repository, with the Pull Request's ("head") version of the file.
0 Comments
Leave a Reply. |