What's Changed
Added multi workflow keepalive
Now you can keep multiple Github actions alive using a single keepalive workflow. Previously you had to add separate keepalive workflow to all the cronjob-triggered Github actions for this to happen.
Example
Let's assume that you have some build workflows:
.github/workflows/build1.yml
name: Build 20
on:
schedule:
- cron: "0 0 * * *"
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "20"
cache: "yarn"
- run: yarn install --frozen-lockfile
- run: yarn build
.github/workflows/build2.yml
name: Build 19
on:
schedule:
- cron: "0 0 * * *"
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "19"
cache: "yarn"
- run: yarn install --frozen-lockfile
- run: yarn build
You can now keep both of these workflows active using the following keepalive workflow code:
.github/workflows/keepalive.yml
name: Keepalive Workflow
on:
schedule:
- cron: "0 0 * * *"
permissions:
actions: write
jobs:
cronjob-based-github-action:
name: Keepalive Workflow
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gautamkrishnar/keepalive-workflow@v2
with:
workflow_files: "build1.yml, build2.yml"
time_elapsed: "0"
Other changes
- Fix readme to have permissions in correct place by @rfay in #26
- fix: typo in dummy commit config by @shihyuho in #28
New Contributors
Full Changelog: 2.0.0...2.0.1