Download the PHP package pierreminiggio/github-action-run-starter-and-artifact-downloader without Composer
On this page you can find all versions of the php package pierreminiggio/github-action-run-starter-and-artifact-downloader. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package github-action-run-starter-and-artifact-downloader
Install using composer :
runActionAndGetArtifacts also accepts a $ref (defaults to 'main') and a $deleteAfterDownloading (defaults to false) parameter. When $deleteAfterDownloading is set to true, the run (and, as a consequence, its artifacts) is deleted from Github once the artifacts have been successfully downloaded :
Async usage
runActionAndGetArtifacts is synchronous : it blocks your script until the run finishes, which can be minutes. If you'd rather start a run and check on it later (from a cron job, a queue worker, a webhook handler, ...), use GithubActionAsyncRunStarterAndArtifactDownloaderFactory::makeAsync() instead.
It needs a secret encryption key of your choosing, used to encrypt/decrypt the run tickets described below. Keep it out of source control (env var, secret manager, ...) : anyone who has it can decrypt a stored ticket back into a raw Github token.
startAction also accepts a $ref (defaults to 'main') and a $deleteAfterDownloading (defaults to false) parameter, with the exact same meaning as on runActionAndGetArtifacts.
startAction still blocks briefly (a handful of short polls, governed by the same two settings as the sync class, see below) while it locates the run it just dispatched on Github — it does not wait for the run to finish.
Later — from any process, as often as you like — check on the run using the stored ticket :
checkAction never sleeps and never blocks waiting on the run — it makes a single API call to check the run's status and returns immediately, whatever the outcome.
Tuning the run-creation checks
Both the sync and the async class dispatch a run and then poll Github until they can tell which run was just created (Github's API doesn't hand back a run id directly when you dispatch a workflow). Two settings control that polling, with the same defaults on both classes :
All versions of github-action-run-starter-and-artifact-downloader with dependencies
pierreminiggio/github-action-artifact-downloader Version ^2.0
pierreminiggio/github-action-run-creator Version ^2.0
pierreminiggio/github-action-runs-lister Version ^4.0
pierreminiggio/github-action-run-artifacts-lister Version ^2.0
pierreminiggio/github-action-run-detailer Version ^2.0
pierreminiggio/github-action-run-deleter Version ^1.0