Skip to content
Open
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
33 changes: 24 additions & 9 deletions .github/workflows/update-standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ jobs:
with:
name: new_standard
path: dicom_standard/dist/*
test-and-commit:
test-and-open-pr:
needs: make
name: Run tox and commit to master
name: Run tox and open a pull request
runs-on: ubuntu-latest
continue-on-error: true
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
Expand All @@ -66,9 +68,22 @@ jobs:
if: steps.diff_files.outputs.diff_lines > 0
- name: Run tests
run: tox
# temporary disable "publish to master", which may commit the changes in an unapproved PR
# - name: Publish to master
# uses: mikeal/publish-to-github-action@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# if: success() && steps.diff_files.outputs.diff_lines > 0
# Publish via a pull request rather than by committing straight to master, so
# regenerated data is reviewed before it lands. Runs only after tox has passed.
- name: Open pull request
if: steps.diff_files.outputs.diff_lines > 0
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
base: master
branch: update-standard/${{ env.DICOM_VERSION }}
delete-branch: true
add-paths: standard/*.json
commit-message: 'Update standard to latest published revision'
title: 'Update standard (DICOM ${{ env.DICOM_VERSION }})'
body: |
Automated regeneration of `standard/*.json` from the current published
DICOM Standard, opened by the `update-standard` workflow.

The test suite (`tox`) passed against this data before the pull request
was created. Review the diff and merge to publish.