Repository navigation
v1.17.0
External actions
A step can now use an action that lives outside Probe, in a GitHub repository of its own or in a local directory. linyows/probe-graphql is the first one:
- name: Look up Japan
uses: github.com/linyows/probe-graphql@f9e7b841b87dccbcbe71ae10f8562aa637d52a51 # v0.1.0
with:
url: https://countries.trevorblades.com/graphql
query: '{ country(code: "JP") { capital } }'
test: res.data.country.capital == "Tokyo"- A remote action is written as
github.com/<owner>/<repo>[/<dir>]@<commit>and must be pinned to a full 40-character commit SHA. A local one is a path starting with./,../or/, relative to the workflow file. - The action's
action.ymlpoints at its executable with a SHA-256 digest per platform. The commit fixesaction.ymlandaction.ymlfixes the executable, which is checked when it is downloaded and again each time it starts. - Every external action is resolved before the first job, so a bad reference fails the run with exit code 2 and a download does not count against a step's timeout.
See External Actions for how to write and publish one.
For library users
Nothing breaks. The new package actionref resolves a uses to an executable, actionrpc.RunExecutable starts an action from an executable other than probe itself, and RunOptions.BaseDir sets the directory local actions are relative to.
Changelog
- efa0c5b Add an example that queries GraphQL with an external action
- e8d0b85 Cover external actions in the end-to-end tests
- a4cf03c Merge pull request #296 from linyows/feat/external-actions
- 5d13384 Run actions published outside Probe
- 337a1d3 Trust only the action.yml at the pinned commit
- 8f96f25 Write the E2E echo server in Go