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

Only publish on master and on qiicr/dcmqi repo. #480

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
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
12 changes: 10 additions & 2 deletions .github/workflows/cmake-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,24 @@ jobs:
cd docker && make dcmqi.test

- name: "Publish docker image"
# Only run if the event is not a pull request and the repository owner is QIICR.
# The latter is to prevent forks from publishing packages even if the owner's token
# would have sufficient privileges.
if: ${{ (github.event_name != 'pull_request') && (github.repository_owner == 'QIICR')}}
run: |
docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASS }} && \
docker push fedorov/dcmqi:`git describe --tags --exact-match 2> /dev/null || echo "latest"` \
|| echo "skipping docker push"

- name: "Publish linux package"
# Only run if the event is not a pull request and the repository owner is QIICR.
# The latter is to prevent forks from publishing packages even if the owner's token
# would have sufficient privileges.
if: ${{ (github.event_name != 'pull_request') && (github.repository_owner == 'QIICR')}}
run: |
pip install -U "scikit-ci-addons>=0.22.0"
# python -m scikit-ci publish --package-name dcmqi --package-version `git
# describe --tags --exact-match 2> /dev/null || echo "latest"` --platform linux
# python -m scikit-ci publish --package-name dcmqi --package-version `git
# describe --tags --exact-match 2> /dev/null || echo "latest"` --platform linux
# --commit-range ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} --repository ${{ github.event.pull_request.head.repo.full_name }} --token ${{ secrets.GITHUB_TOKEN }} --verbose
ci_addons publish_github_release QIICR/dcmqi \
--prerelease-packages "build/dcmqi-build/dcmqi-*-linux-*.tar.gz" \
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/cmake-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,19 @@ jobs:

# ...and finally package it.
- name: "Package dcmqi"
# Only run if the event is not a pull request and the repository owner is QIICR.
# The latter is to prevent forks from publishing packages even if the owner's token
# would have sufficient privileges.
if: ${{ (github.event_name != 'pull_request') && (github.repository_owner == 'QIICR')}}
run: |
cd ${{ github.workspace }}/dcmqi-build/dcmqi-build && ninja package


- name: Publish package
# Only run if the event is not a pull request and the repository owner is QIICR.
# The latter is to prevent forks from publishing packages even if the owner's token
# would have sufficient privileges.
if: ${{ (github.event_name != 'pull_request') && (github.repository_owner == 'QIICR')}}
run: |
pip install -U "scikit-ci-addons>=0.22.0"
ci_addons publish_github_release qiicr/dcmqi
Expand Down