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

Update CI on the mast to only create package when PyEMD/__init__.py changes #153

Merged
merged 3 commits into from
Mar 21, 2024
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
24 changes: 23 additions & 1 deletion .github/workflows/ci-main-build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master
- ci-test

jobs:
build-n-test:
Expand Down Expand Up @@ -32,9 +33,30 @@ jobs:
run: |
python -m PyEMD.tests.test_all

version-updated:
runs-on: ubuntu-latest
needs: build-n-test
outputs:
pyemd_version: ${{ steps.version.outputs.pyemd_version }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: version
with:
filters: |
pyemd_version:
- 'PyEMD/__init__.py'
- name: Check if version is updated
if: ${{ steps.version.outputs.pyemd_version == 'true'}}
run: echo "PyEMD version is updated"
- name: Check if version is not updated
if: ${{ steps.version.outputs.pyemd_version == 'false'}}
run: echo "PyEMD version is not updated"

deploy:
# Run 'deploy' job only if `PyEMD/__init__.py` is modified
if: github.event_name == 'push' && contains(github.event.head_commit.modified, 'PyEMD/__init__.py')
if: needs.version-updated.outputs.pyemd_version == 'true'
needs: version-updated
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down