Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miguelteixeiraa/action-run-in-background
Action to run stuff in background
https://github.com/miguelteixeiraa/action-run-in-background
Last synced: about 1 month ago
JSON representation
Action to run stuff in background
- Host: GitHub
- URL: https://github.com/miguelteixeiraa/action-run-in-background
- Owner: miguelteixeiraa
- License: apache-2.0
- Created: 2023-11-11T21:31:58.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-12T21:49:14.000Z (about 1 year ago)
- Last Synced: 2023-11-13T22:29:54.027Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 582 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# run-in-background Action
Action to run stuff in background
![alt text](https://github.com/miguelteixeiraa/action-run-in-background/actions/workflows/lint-and-test.yaml/badge.svg)
### Inputs
```yaml
- uses: miguelteixeiraa/action-run-in-background@v1
with:
# Description: The script to run in background
#
# required: true
script: ''# Description: The script that tells whether of not the process is ready/health.
#
# required: true
readiness-script: ''# Description: The type of the shell that should be called.
#
# required: false
# Default: bash
shell: bash# Description: Max time in seconds to wait for readiness.
#
# required: false
# Default: 120
timeout: 120
```### Usage
```yaml
name: Hello Workflow
on:
push:
branches: '*'jobs:
helloJob:
runs-on: ubuntu-latest
steps:
- name: 'Spin up server'
uses: miguelteixeiraa/action-run-in-background@v1
with:
script: |
# run some blocking stuff
pnpm startreadiness-script: |
# check if whatever is it to run, is ready
if curl -sSf http://localhost:8000/hello > /dev/null; then
echo "curl request was successful."
else
echo "curl request failed."
exit 1
fishell: bash
timeout: 30
```### How it works
Uses NodeJs to spawn an independent process and runs the **health check** at every 5 seconds.
### License
[Apache 2.0](LICENSE)