Skip to content

Commit

Permalink
Merge pull request #916 from pllim/action-ver-hash
Browse files Browse the repository at this point in the history
MNT: Use hash for Action workflow versions and update if needed
  • Loading branch information
BradleySappington authored Nov 22, 2024
2 parents 3d173e3 + cd6647d commit 25e37a7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
build:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0
with:
upload_to_pypi: ${{ (github.event_name == 'release') && (github.event.action == 'released') }}
secrets:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]

jobs:
retrieve_cache:
uses: spacetelescope/webbpsf/.github/workflows/retrieve_cache.yml@develop
uses: spacetelescope/webbpsf/.github/workflows/retrieve_cache.yml@beda656c80a0254e6f80649d9c9c49235634522f # v1.4.0
with:
minimal: true
tests:
Expand Down Expand Up @@ -49,20 +49,20 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ${{ matrix.python }}

- name: Install Python dependencies
run: pip install tox tox-conda>=0.2

- name: Get WebbPSF Data
uses: actions/cache/restore@v4
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ${{ needs.retrieve_cache.outputs.cache_path }}
key: ${{ needs.retrieve_cache.outputs.cache_key }}
Expand Down Expand Up @@ -90,6 +90,6 @@ jobs:

- name: Upload coverage to codecov
if: ${{ contains(matrix.toxenv,'-cov') }}
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
file: ./coverage.xml
4 changes: 2 additions & 2 deletions .github/workflows/download_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# - cron: "0 0 * * 0"
# jobs:
# download_webbpsf:
# uses: spacetelescope/webbpsf/.github/workflows/download_data.yml@develop
# uses: spacetelescope/webbpsf/.github/workflows/download_data.yml@beda656c80a0254e6f80649d9c9c49235634522f # v1.4.0
# with:
# minimal: true

Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
run: echo "version=$(cat ${{ steps.cache_path.outputs.cache_path }}/webbpsf-data/version.txt)" >> $GITHUB_OUTPUT
- id: cache_key
run: echo "cache_key=webbpsf-data-${{ (github.event_name == 'schedule' || github.event_name == 'release') && 'mini' || inputs.minimal && 'mini' || 'full' }}-${{ steps.version.outputs.version }}" >> $GITHUB_OUTPUT
- uses: actions/cache/save@v4
- uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ${{ runner.temp }}/data/
key: ${{ steps.cache_key.outputs.cache_key }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/retrieve_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
# ...
# jobs:
# webbpsf_data_cache_key:
# uses: spacetelescope/webbpsf/.github/workflows/retrieve_cache.yml@develop
# uses: spacetelescope/webbpsf/.github/workflows/retrieve_cache.yml@beda656c80a0254e6f80649d9c9c49235634522f # v1.4.0
# with:
# minimal: true
# tests:
# needs: [ webbpsf_data_cache_key ]
# steps:
# ...
# - name: retrieve WebbPSF data cache
# uses: actions/cache/restore@v4
# uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
# with:
# path: ${{ runner.temp }}/webbpsf-data
# key: ${{ needs.webbpsf_data_cache_key.outputs.cache_key }}
Expand Down

0 comments on commit 25e37a7

Please sign in to comment.