{"id":17151240,"url":"https://github.com/soda480/wait-for-message-action","last_synced_at":"2026-02-23T00:10:40.310Z","repository":{"id":62757363,"uuid":"562260037","full_name":"soda480/wait-for-message-action","owner":"soda480","description":"GitHub Action to facilitate synchronization of jobs","archived":false,"fork":false,"pushed_at":"2022-11-13T04:27:55.000Z","size":35,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-26T07:44:55.434Z","etag":null,"topics":["github-actions","github-actions-composite","github-actions-docker","job","job-synchronization","socket","synchronization","wait-for-message"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soda480.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-05T19:37:44.000Z","updated_at":"2024-03-28T20:40:39.000Z","dependencies_parsed_at":"2023-01-22T21:45:54.738Z","dependency_job_id":null,"html_url":"https://github.com/soda480/wait-for-message-action","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/soda480/wait-for-message-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soda480%2Fwait-for-message-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soda480%2Fwait-for-message-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soda480%2Fwait-for-message-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soda480%2Fwait-for-message-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soda480","download_url":"https://codeload.github.com/soda480/wait-for-message-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soda480%2Fwait-for-message-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29731802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T20:09:16.275Z","status":"ssl_error","status_checked_at":"2026-02-22T20:09:13.750Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["github-actions","github-actions-composite","github-actions-docker","job","job-synchronization","socket","synchronization","wait-for-message"],"created_at":"2024-10-14T21:37:34.810Z","updated_at":"2026-02-23T00:10:40.287Z","avatar_url":"https://github.com/soda480.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wait-for-message-action\n\nA GitHub Action that runs the [wait-for-message](https://pypi.org/project/wait-for-message/) Python utility. A simple client server utility that blocks until a message is sent/received on a TCP/IP socket connection. This action is useful for synchronizing interdependent networked jobs.\n\n### **`wait`**\n\nBind the local ip address on a port and wait (i.e. block) for a message to be received, if no message is received within the designated timeout an error is raised.\n\n### **`send`**\n\nSend a message to the ip address and port via a tcp socket connection, if no acknowledgement is received due to a socket error the message will be resent until maximum attempts waiting delay seconds between each attempt, if max attempts exceeded an error is raised.\n\n## Runs On\n\n\u003e **Note**: This action is only meant to be run on self-hosted GitHub Action runners.\n\n|     Capability | Compatible | Note                |\n| -------------: | :--------: | --------------------- |\n|   Docker Linux |     yes     | Requires Docker       |\n|   Native Linux |     yes     | Requires Python \u003e 3.7 |\n| Docker Windows |     no     | Non Supported         |\n| Native Windows |     yes     | Requires Python \u003e 3.7 |\n\n## Inputs\n\n| **Input**                      | **Description**                                                                          | **Default** | **Required** |\n| ------------------------------ | ---------------------------------------------------------------------------------------- | ----------- | ------------ |\n| **\u003ccode\u003ecommand\u003c/code\u003e**       | The command to execute; `wait` or `send`                                                 |             | **true**     |\n| **\u003ccode\u003eip\u003c/code\u003e**            | For `send`; the IP address of the server. For `wait` the IP address that will be binded is 0.0.0.0                                          |             | **true**     |\n| **\u003ccode\u003eport\u003c/code\u003e**          | For `send`; the TCP port number of the server. For `wait`; the TCP port number to listen on |             | **true**     |\n| **\u003ccode\u003emessage\u003c/code\u003e**       | For `send`; the message to send. For `wait`; the message to wait for                     |             | **true**     |\n| **\u003ccode\u003edelay\u003c/code\u003e**         | For `send`; the number of seconds to delay between retries                               | 10          | **false**    |\n| **\u003ccode\u003eattempts\u003c/code\u003e**      | For `send`; the maximum retry attempts                                                   | 60          | **false**    |\n| **\u003ccode\u003etimeout\u003c/code\u003e**       | For `wait`; the number of seconds to wait for message                                    | 900         | **false**    |\n| **\u003ccode\u003euse_container\u003c/code\u003e** | Use Docker container for execution                                                       | false       | **false**    |\n| **\u003ccode\u003eshell\u003c/code\u003e**         | The shell to use                                                                         | bash        | **false**    |\n\n\n## Usage\n\n### Send\n\n\u003cdetails\u003e\u003csummary\u003eSend - Native Linux\u003c/summary\u003e\n\n```bash\nname: Test Native Send\non: workflow_dispatch\njobs:\n  test:\n    runs-on: self-hosted-linux\n    steps:\n    - name: Send for a Message\n      uses: soda480/wait-for-message-action\n      with:\n        command: \"send\"\n        ip: \"192.168.1.184\"\n        port: 8080\n        message: \"ready to proceed\"\n        timeout: 60\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eSend - Docker Linux\u003c/summary\u003e\n\n```bash\nname: Test Container Send\non: workflow_dispatch\njobs:\n  test:\n    runs-on: self-hosted-linux\n    steps:\n    - name: Send for a Message\n      uses: soda480/wait-for-message-action\n      with:\n        command: \"send\"\n        ip: \"192.168.1.184\"\n        port: 8080\n        message: \"ready to proceed\"\n        timeout: 60\n        use_container: true\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eSend - Native Windows\u003c/summary\u003e\n\n```bash\nname: Test Windows Send\non: workflow_dispatch\njobs:\n  test:\n    runs-on: self-hosted-windows\n    steps:\n    - name: Send for a Message\n      uses: soda480/wait-for-message-action\n      with:\n        command: \"send\"\n        ip: \"192.168.1.199\"\n        port: 8080\n        message: \"ready to proceed\"\n        timeout: 60\n        shell: cmd\n```\n\n\u003c/details\u003e\n\n### Wait\n\n\u003cdetails\u003e\u003csummary\u003eWait - Native Linux\u003c/summary\u003e\n\n```bash\nname: Test Native Wait\non: workflow_dispatch\njobs:\n  test:\n    runs-on: self-hosted-linux\n    steps:\n    - name: Wait for a Message\n      uses: soda480/wait-for-message-action\n      with:\n        command: \"wait\"\n        port: 8080\n        message: \"ready to proceed\"\n        timeout: 60\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eWait - Docker Linux\u003c/summary\u003e\n\n```bash\nname: Test Container Wait\non: workflow_dispatch\njobs:\n  test:\n    runs-on: self-hosted-linux\n    steps:\n    - name: Wait for a Message\n      uses: soda480/wait-for-message-action\n      with:\n        command: \"wait\"\n        port: 8080\n        message: \"ready to proceed\"\n        timeout: 60\n        use_container: true\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003eWait - Native Windows\u003c/summary\u003e\n\n```bash\nname: Test Windows Wait\non: workflow_dispatch\njobs:\n  test:\n    runs-on: self-hosted-windows\n    steps:\n    - name: Wait for a Message\n      uses: soda480/wait-for-message-action\n      with:\n        command: \"wait\"\n        port: 8080\n        message: \"ready to proceed\"\n        timeout: 60\n        shell: cmd\n```\n\n\u003c/details\u003e\n\n## Examples\n\n### Synchronize Jobs\n\nA Job depends on another Job.\n\n![Example](./docs/images/JobSync.png?raw=true)\n\nTwo self-hosted runners A and B.\n\nTask-B1 depends on Task-A1 completing, thus add a **Wait** Job before Task-B1 that will wait/listen for a \"Ready to Proceed\" message, also add a **Send** Job after Task-A1 that will send the \"Ready to Proceed\" message to B. \n\nLikewise, Task-A2 depends on Task-B1 completing, thus add a **Wait** Job before Task-A2 that will wait/listen for a \"Ready to Proceed\" message, also add a **Send** Job after Task-B1 that will send the \"Ready to Proceed\" message to A.\n\nThe **Send** Jobs require the IP address of the runner that the message will be sent to, thus the first Jobs are to acquire the IP addresses of the respective self-hosted runners.\n\n[Example Code](./.github/workflows/test-job-sync.yml?raw=true)\n\n### Synchronize steps within Jobs\n\nA step within one Job depends on a step within another Job.\n\nThis example is essentially the same as above, except dependencies are between steps within Jobs. The same logic applies, the wait and send tasks are defined within the steps of the Jobs.\n\n[Example Code](./.github/workflows/test-job-sync-steps.yml?raw=true)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoda480%2Fwait-for-message-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoda480%2Fwait-for-message-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoda480%2Fwait-for-message-action/lists"}