{"id":19270357,"url":"https://github.com/netdata/infra-trigger-workflow-and-wait","last_synced_at":"2025-10-26T02:49:29.323Z","repository":{"id":65978464,"uuid":"551454096","full_name":"netdata/infra-trigger-workflow-and-wait","owner":"netdata","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-19T08:20:42.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-01T23:47:03.583Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netdata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-14T12:35:01.000Z","updated_at":"2025-01-16T02:35:32.000Z","dependencies_parsed_at":"2024-11-09T20:26:38.212Z","dependency_job_id":"67068349-2d53-42cd-b0ef-31aeda4f847b","html_url":"https://github.com/netdata/infra-trigger-workflow-and-wait","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"eccea8f3cd46c92fe6987f88ec0a34d1617c6040"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netdata%2Finfra-trigger-workflow-and-wait","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netdata%2Finfra-trigger-workflow-and-wait/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netdata%2Finfra-trigger-workflow-and-wait/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netdata%2Finfra-trigger-workflow-and-wait/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netdata","download_url":"https://codeload.github.com/netdata/infra-trigger-workflow-and-wait/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240371758,"owners_count":19790888,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T20:24:25.734Z","updated_at":"2025-10-26T02:49:24.292Z","avatar_url":"https://github.com/netdata.png","language":"Shell","readme":"# Trigger Workflow and Wait\n\nSourced from: https://github.com/convictional/trigger-workflow-and-wait\n\nGithub Action for trigger a workflow from another workflow. The action then waits for a response.\n\n**When would you use it?**\n\nWhen deploying an app you may need to deploy additional services, this Github Action helps with that.\n\n\n## Arguments\n\n| Argument Name            | Required   | Default     | Description           |\n| ---------------------    | ---------- | ----------- | --------------------- |\n| `owner`                  | True       | N/A         | The owner of the repository where the workflow is contained. |\n| `repo`                   | True       | N/A         | The repository where the workflow is contained. |\n| `github_token`           | True       | N/A         | The Github access token with access to the repository. Its recommended you put it under secrets. |\n| `workflow_file_name`     | True       | N/A         | The reference point. For example, you could use main.yml. |\n| `github_user`            | False      | N/A         | The name of the github user whose access token is being used to trigger the workflow. |\n| `ref`                    | False      | main        | The reference of the workflow run. The reference can be a branch, tag, or a commit SHA. |\n| `wait_interval`          | False      | 10          | The number of seconds delay between checking for result of run. |\n| `client_payload`         | False      | `{}`        | Payload to pass to the workflow, must be a JSON string |\n| `propagate_failure`      | False      | `true`      | Fail current job if downstream job fails. |\n| `trigger_workflow`       | False      | `true`      | Trigger the specified workflow. |\n| `wait_workflow`          | False      | `true`      | Wait for workflow to finish. |\n| `last_workflow_interval` | False      | 0           | The number of seconds delay between checking for the last workflow. default: 0 |\n\n\n## Example\n\n### Simple\n\n```yaml\n- uses: netdata/ifnra-trigger-workflow-and-wait@v1.6.1\n  with:\n    owner: keithconvictional\n    repo: myrepo\n    github_token: ${{ secrets.GITHUB_PERSONAL_ACCESS_TOKEN }}\n```\n\n### All Options\n\n```yaml\n- uses: netdata/ifnra-trigger-workflow-and-wait@v1.6.1\n  with:\n    owner: keithconvictional\n    repo: myrepo\n    github_token: ${{ secrets.GITHUB_PERSONAL_ACCESS_TOKEN }}\n    github_user: github-user\n    workflow_file_name: main.yml\n    ref: release-branch\n    wait_interval: 10\n    client_payload: '{}'\n    propagate_failure: false\n    trigger_workflow: true\n    wait_workflow: true\n    last_workflow_interval: 1\n```\n\n\n## Testing\n\nYou can test out the action locally by cloning the repository to your computer. You can run:\n\n```shell\nINPUT_WAIT_INTERVAL=10 \\\n  INPUT_PROPAGATE_FAILURE=false \\\n  INPUT_TRIGGER_WORKFLOW=true \\\n  INPUT_WORKFLOW_FILE_NAME=\"main.yml\" \\\n  INPUT_GITHUB_USER=\"github-user\" \\\n  INPUT_WAIT_WORKFLOW=true \\\n  INPUT_LAST_WORKFLOW_INTERVAL=1 \\\n  INPUT_OWNER=\"keithconvictional\" \\\n  INPUT_REPO=\"trigger-workflow-and-wait-example-repo1\" \\\n  INPUT_GITHUB_TOKEN=\"\u003cREDACTED\u003e\" \\\n  INPUT_CLIENT_PAYLOAD='{}' \\\n  busybox sh entrypoint.sh\n```\n\nYou will have to create a Github Personal access token. You can create a test workflow to be executed. In a repository, add a new `main.yml` to `.github/workflows/`. The workflow will be:\n\n```shell\nname: Main\non:\n  workflow_dispatch\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@master\n      - name: Pause for 25 seconds\n        run: |\n          sleep 25\n```\n\nYou can see the example [here](https://github.com/keithconvictional/trigger-workflow-and-wait-example-repo1/blob/master/.github/workflows/main.yml). For testing a failure case, just add this line after the sleep:\n\n```yaml\n...\n- name: Pause for 25 seconds\n  run: |\n    sleep 25\n    echo \"For testing failure\"\n    exit 1\n```\n\n## Potential Issues\n\n### Changes\n\nIf you do not want the latest build all of the time, please use a versioned copy of the Github Action. You specify the version after the `@` sign.\n\n```yaml\n- uses: netdata/ifnra-trigger-workflow-and-wait@v1.6.1\n  with:\n    owner: keithconvictional\n    repo: myrepo\n    github_token: ${{ secrets.GITHUB_PERSONAL_ACCESS_TOKEN }}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetdata%2Finfra-trigger-workflow-and-wait","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetdata%2Finfra-trigger-workflow-and-wait","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetdata%2Finfra-trigger-workflow-and-wait/lists"}