Fetch meals #487
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: Fetch meals | |
on: | |
schedule: | |
- cron: '0 4 * * *' | |
workflow_dispatch: | |
jobs: | |
fetch_meals: | |
name: Fetch meals for 7 days | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Download CLI JAR | |
uses: dawidd6/action-download-artifact@v3 | |
with: | |
workflow: ci.yml | |
workflow_conclusion: success | |
- name: Run scraper | |
shell: bash | |
env: | |
NUM_DAYS: '7' | |
JAR_PATH: 'cli/cli-*-dependencies.jar' | |
run: bash fetch.sh | |
- name: Commit | |
uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |
add: 'archive' | |
message: 'data: fetch latest meals' |