Skip to content

Commit

Permalink
Merge pull request #480 from QIICR/mac_and_linux_only_publish_on_master
Browse files Browse the repository at this point in the history
Only publish on master and on qiicr/dcmqi repo.
  • Loading branch information
fedorov authored Nov 1, 2023
2 parents 697ff25 + fb53286 commit f41acf2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
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

0 comments on commit f41acf2

Please sign in to comment.