Cron Job to post a tool every 24 hours #74
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Cron Job to post a tool every 24 hours" | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
env: | |
MASTODON_INSTANCE: ${{ secrets.MASTODON_INSTANCE }} | |
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }} | |
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }} | |
GH_USERNAME: ${{ secrets.GH_USERNAME }} | |
NOTIFY_URL: ${{ secrets.NOTIFY_URL }} | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: oven-sh/setup-bun@v2 | |
- name: Run the script | |
run: | | |
bun install | |
bun run index.ts |