Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue where the path of the WebbPSF cache was not the same as the restore cache in the subsequent workflow #988

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
path: ${{ steps.path.outputs.path }}
steps:
- id: path
run: echo "path=${{ env.DATA_PATH }}/webbpsf-data" >> $GITHUB_OUTPUT
run: echo "path=${{ needs.path.outputs.path }}/webbpsf-data" >> $GITHUB_OUTPUT
webbpsf_data:
if: (github.repository == 'spacetelescope/romancal' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'update webbpsf data')))
needs: [ webbpsf_path ]
needs: [ path, webbpsf_path ]
name: download and cache WebbPSF data
runs-on: ubuntu-latest
env:
Expand All @@ -45,12 +45,12 @@ jobs:
- id: cache_check
uses: actions/cache@v3
with:
path: ${{ needs.webbpsf_path.outputs.path }}
path: ${{ needs.path.outputs.path }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was the offending line, for future reference (and other repos' workflows that may have the same problem)

key: webbpsf-${{ steps.data_hash.outputs.hash }}
- if: ${{ steps.cache_check.outputs.cache-hit != 'true' }}
run: mkdir -p ${{ env.DATA_PATH }}
run: mkdir -p ${{ needs.path.outputs.path }}
- if: ${{ steps.cache_check.outputs.cache-hit != 'true' }}
run: tar -xzvf tmp/webbpsf-data.tar.gz -C ${{ env.DATA_PATH }}
run: tar -xzvf tmp/webbpsf-data.tar.gz -C ${{ needs.path.outputs.path }}
webbpsf_hash:
needs: [ webbpsf_path, webbpsf_data ]
# run data job if webbpsf-data succeeds or is skipped. This allows
Expand Down