forked from spacetelescope/romancal
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.21 KB
/
data.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: download and cache data
on:
schedule:
- cron: "42 4 * * 3"
workflow_dispatch:
inputs:
webbpsf_minimal:
description: minimal WebbPSF dataset
type: boolean
required: false
default: true
jobs:
download_webbpsf_data:
uses: spacetelescope/webbpsf/.github/workflows/download_data.yml@develop
with:
minimal: ${{ github.event_name != 'workflow_dispatch' && true || inputs.webbpsf_minimal }}
move_data_cache_path:
needs: [ download_webbpsf_data ]
runs-on: ubuntu-latest
steps:
- name: retrieve cached WebbPSF data
uses: actions/cache/restore@v4
with:
path: ${{ needs.download_webbpsf_data.outputs.cache_path }}
key: ${{ needs.download_webbpsf_data.outputs.cache_key }}
- run: mkdir -p /tmp/data/
- run: mv ${{ needs.download_webbpsf_data.outputs.cache_path }}/webbpsf-data/ /tmp/data/
- run: echo WEBBPSF_PATH=/tmp/data/webbpsf-data/ >> $GITHUB_ENV
# save a new cache to the generalized data directory
- name: save a single combined data cache
uses: actions/cache/save@v4
with:
path: /tmp/data/
key: ${{ needs.download_webbpsf_data.outputs.cache_key }}