File tree Expand file tree Collapse file tree
{{ cookiecutter.package_name }}/.github/workflows Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 "include_example_code" : " n" ,
3030 "include_cruft_update_github_workflow" : " n" ,
3131 "use_extended_ruff_linting" : " n" ,
32+ "matrix_room_id" : " " ,
3233 "_sphinx_theme" : " sunpy" ,
3334 "_parent_project" : " " ,
3435 "_install_requires" : " " ,
4445 "download_url" : " PyPI address for the project, optional" ,
4546 "documentation_url" : " Documentation URL, optional" ,
4647 "changelog_url" : " URL to the changelog, optional" ,
47- "issue_tracker_url" : " URL to the issue tracker, optional"
48+ "issue_tracker_url" : " URL to the issue tracker, optional" ,
49+ "matrix_room_id" : " A room ID to enable matrix notifications in the CI workflow."
4850 }
4951}
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ def bake_examples(cookies):
7979 "author_name" : "test" ,
8080 "use_extended_ruff_linting" : "y" ,
8181 "issue_tracker_url" : "https://github.com/sunpy/sunpy/issues" ,
82+ "matrix_room_id" : "!example:matrix.org" ,
8283 }
8384 )
8485 return _handle_cookiecutter_errors (result )
Original file line number Diff line number Diff line change @@ -137,3 +137,22 @@ jobs:
137137
138138 - name : Run upload
139139 uses : pypa/gh-action-pypi-publish@v1.13.0 # zizmor: ignore[unpinned-uses]
140+
141+ {% if cookiecutter.matrix_room_id -%}
142+ notify :
143+ if : {{ "${{ !cancelled() && (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') }}" }}
144+ needs : [build_dists]
145+ runs-on : ubuntu-latest
146+ environment :
147+ name : matrix
148+ steps :
149+ - uses : Cadair/matrix-notify-action@main # zizmor: ignore[unpinned-uses]
150+ with :
151+ workflow_description : " CI Workflow"
152+ matrix_token : {{ '${{ secrets.MATRIX_ACCESS_TOKEN }}' }}
153+ github_token : {{ '${{ secrets.GITHUB_TOKEN }}' }}
154+ homeserver : {{ '${{ secrets.MATRIX_HOMESERVER }}' }}
155+ roomid : ' {{ cookiecutter.matrix_room_id }}'
156+ ignore_pattern : ' .*(Load|report overall).*'
157+ summarise_success : true
158+ {%- endif %}
You can’t perform that action at this time.
0 commit comments