/github-actions-from-jenkins

Trigger and wait for a GitHub Action workflow from a Jenkins pipeline.

Primary LanguageGroovy

GitHub Actions from Jenkins

My action My failing action

Trigger and wait for a GitHub Action workflow from a Jenkins pipeline.

Details

Given the API to trigger a GitHub Action doesn't return any identifier, the strategy adopted here is to generate a UUID from Jenkins, passing it to a standardised inputs.trigger_id field to the newly triggered GitHub Action. The identifier is going to be used as a workflow artifact name, which will then be used to identify the actual workflow run from Jenkins. This will enable Jenkins to wait for the specific workflow run completion.