Skip to content

Commit

Permalink
Add daily workflow for harvesting observation weather data
Browse files Browse the repository at this point in the history
  • Loading branch information
senkenn committed Dec 28, 2024
1 parent ccc18e3 commit 89e7768
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/daily.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
on:
schedule:
- cron: "0 0 * * *" # Run at 9 AM in JST
push:
branches:
- main

jobs:
daily:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db
packages/cron_jobs/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Build
run: pnpm --filter cron_jobs exec cargo build --release

- name: Set AWS credentials to .env file
run: |
echo ${{ secrets.AWS_ACCESS_KEY_ID }} >> packages/cron_jobs/.env
echo ${{ secrets.AWS_SECRET_ACCESS_KEY }} >> packages/cron_jobs/.env
- name: Harvest the observation weather data
run: |
./packages/cron_jobs/target/release/harvest_observation_weather_data

0 comments on commit 89e7768

Please sign in to comment.