Skip to content

Commit

Permalink
Run 4 times a day
Browse files Browse the repository at this point in the history
  • Loading branch information
insolor committed Dec 17, 2024
1 parent c695afd commit d586c67
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/check-for-updates.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Check for updates
on:
schedule:
- cron: "0 0,6,12,18 * * *"

push:
branches:
- main
Expand Down Expand Up @@ -40,8 +43,7 @@ jobs:

- name: Run script
id: script
# run: echo "updated=$(uv run main.py)" >> $GITHUB_OUTPUT
run: echo "updated=yes" >> $GITHUB_OUTPUT
run: echo "updated=$(uv run main.py)" >> $GITHUB_OUTPUT

- name: Commit changes
if: ${{ !contains(fromJSON('["push", "pull_request"]'), github.event_name) }} # commit changes only if scheduled
Expand All @@ -54,7 +56,7 @@ jobs:

create-issue:
needs: check-for-updates
if: ${{ needs.check-for-updates.outputs.updated == 'yes' }}
if: ${{ !contains(fromJSON('["push", "pull_request"]'), github.event_name) && needs.check-for-updates.outputs.updated == 'yes' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit d586c67

Please sign in to comment.