Skip to content

Commit

Permalink
Merge pull request #242 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
pllim authored Sep 27, 2024
2 parents b80632a + 51ede39 commit f35450d
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 12 deletions.
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: ".github/workflows" # Location of package manifests
schedule:
interval: "monthly"
groups:
actions:
patterns:
- "*"
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check change log entry
uses: scientific-python/action-check-changelogfile@6087eddce1d684b0132be651a4dad97699513113 # 0.2
uses: scientific-python/action-check-changelogfile@1fc669db9618167166d5a16c10282044f51805c0 # 0.3
env:
CHANGELOG_FILENAME: CHANGES.rst
CHECK_MILESTONE: false
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
outputs:
requirements-hash: ${{ steps.requirements-hash.outputs.hash }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- id: requirements-hash
run: echo "::set-output name=hash::${{ hashFiles('**/pyproject.toml', '**/setup.*', 'tox.ini') }}"

core:
needs: [setup]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0
with:
cache-path: ~/.cache/pip
cache-key: pip-${{ needs.setup.outputs.requirements-hash }}
Expand All @@ -44,7 +44,7 @@ jobs:

asdf-schemas:
needs: [setup]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0
with:
cache-path: ~/.cache/pip
cache-key: pip-${{ needs.setup.outputs.requirements-hash }}
Expand All @@ -59,7 +59,7 @@ jobs:
test:
needs: [core, asdf-schemas]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0
with:
cache-path: ~/.cache/pip
cache-key: pip-${{ needs.setup.outputs.requirements-hash }}
Expand All @@ -73,7 +73,7 @@ jobs:
dev:
needs: [core, asdf-schemas]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0
with:
cache-path: ~/.cache/pip
cache-key: pip-${{ needs.setup.outputs.requirements-hash }}
Expand All @@ -88,7 +88,7 @@ jobs:
oldest:
needs: [core, asdf-schemas]
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0
with:
cache-path: ~/.cache/pip
cache-key: pip-${{ needs.setup.outputs.requirements-hash }}
Expand All @@ -103,7 +103,7 @@ jobs:
wheel_building:
permissions:
contents: none
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
if: (github.event_name == 'push' || github.event_name == 'pull_request')
with:
upload_to_pypi: false
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ permissions:

jobs:
astropy:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0
if: (github.repository == 'astropy/asdf-astropy' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Downstream CI')))
with:
submodules: false
Expand All @@ -34,7 +34,7 @@ jobs:
- linux: specutils
stsci:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0
if: (github.repository == 'astropy/asdf-astropy' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Downstream CI')))
with:
submodules: false
Expand All @@ -47,7 +47,7 @@ jobs:
- linux: roman_datamodels
third-party:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@924441154cf3053034c6513d5e06c69d262fb9a6 # v1.13.0
if: (github.repository == 'astropy/asdf-astropy' && (github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'Downstream CI')))
with:
submodules: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
permissions:
contents: none
if: (github.event_name == 'release')
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: true
test_extras: test
Expand Down

0 comments on commit f35450d

Please sign in to comment.