Skip to content

Commit

Permalink
Update datasets weekly (#170)
Browse files Browse the repository at this point in the history
* Replace set-output command with environment variable

* Change from daily to weekly

* Modify time stamp to trigger workflow
  • Loading branch information
mjaehn authored Jul 15, 2024
1 parent 99f849c commit 71af23d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/update_datasets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Update Datasets and Create PR

on:
schedule:
- cron: '0 2 * * *' # Runs at 02:00 UTC every day
- cron: '0 2 * * 7' # Runs at 02:00 UTC every Sunday
workflow_dispatch: # This line enables manual triggering of the workflow

jobs:
Expand Down Expand Up @@ -31,19 +31,20 @@ jobs:
git diff
if [ -n "$(git status -s)" ]; then
echo "Changes detected"
echo "::set-output name=changes_detected::true"
fi
echo "changes_detected=true" >> $GITHUB_ENV
else
echo "changes_detected=false" >> $GITHUB_ENV
- name: Commit changes
if: steps.git-check.outputs.changes_detected == 'true'
if: env.changes_detected == 'true'
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "GitHub Action: Update datasets"
- name: Create Pull Request
if: steps.git-check.outputs.changes_detected == 'true'
if: env.changes_detected == 'true'
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion docs/datasets/climate_model_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
/nfs/atmos/c2sm/cmip6-ng
```

- Size: 200.62 TB :material-information-outline:{ title="last updated: 2024-07-15 11:26:46" }
- Size: 200.62 TB :material-information-outline:{ title="last updated: 2024-07-15 11:26:45" }
- Number of files: 663,800 :material-information-outline:{ title="last updated: 2024-07-15 11:26:46" }
- Access: direct / rsync
- Status: frozen (2019-03)
Expand Down

0 comments on commit 71af23d

Please sign in to comment.