Running a daemon as a server and accessing it from outside the VM is not within the terms of use for Actions.
This package just a demonstration of an easy way of running applications using GitHub Actions and not intended to be used by anyone.
Please don't do this.
Runs a given command
and handles its restarts:
- waits for the finish of all other runs of the same workflow before starting the command
- sends
SIGTERM
to the runningcommand
once a new run appear
Required The command to run
Used to poll GitHub API for statuses of the same workflow that running the daeomn.
Default: ${{ github.token }}
To test services manually or run live repo examples
Example repo: github-action-daemon-example-telegram-bot
name: Daemon demo
on:
push:
branches:
- main
schedule:
# # # # # # # # # #
# restart each 1 hour
- cron: "0 */1 * * *"
# # # # # # # # # #
jobs:
start:
runs-on: ubuntu-latest
name: Start daemon
steps:
- uses: actions/checkout@v2
- uses: vladkosinov/[email protected]
env:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
with:
command: "node .github/workflows/demo/index.js"
Example repo: github-action-daemon-example-docker-compose
name: Running
on:
push:
branches:
- main
schedule:
- cron: "0 */1 * * *"
jobs:
start:
runs-on: ubuntu-latest
name: Start
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: 'docker/awesome-compose'
path: 'awesome-compose'
- uses: vladkosinov/[email protected]
with:
command: |
#
# localtunnel-live.sh creates tunnel and pushes URL to the README.md
# https://github.com/vladkosinov/github-action-daemon-example-docker-compose/blob/main/localtunnel-live.sh
#
./localtunnel-live.sh & (cd awesome-compose/react-rust-postgres && docker-compose up)