Skip to content

👷 Enable templating for common files #1005

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

Draft
wants to merge 58 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
1296fa9
Add CI to test templating [skip ci]
denialhaag Jun 18, 2025
166e425
Move tamplating into own workflow
denialhaag Jun 18, 2025
4a0e253
Disable CI for now
denialhaag Jun 18, 2025
71220e7
Maybe fix templating workflow
denialhaag Jun 18, 2025
07fade8
Push something
denialhaag Jun 18, 2025
8a0f7f4
Push something
denialhaag Jun 18, 2025
e237c3a
Use custum action
denialhaag Jun 19, 2025
be430ea
Fix action path
denialhaag Jun 19, 2025
2ac3d05
Push something
denialhaag Jun 19, 2025
f333446
Push something
denialhaag Jun 19, 2025
778dbff
Push something
denialhaag Jun 19, 2025
b25b20e
Push to current branch
denialhaag Jun 19, 2025
de38c47
Specify branch name directly
denialhaag Jun 19, 2025
32ce319
Do not set user.name
denialhaag Jun 19, 2025
d16e340
Do set user.name and user.email
denialhaag Jun 19, 2025
2b91f39
Push something
denialhaag Jun 19, 2025
11f3c02
Checkout the branch explicitly
denialhaag Jun 19, 2025
6275df2
Push to HEAD?
denialhaag Jun 19, 2025
1af2364
🤠 Follow the documentation
denialhaag Jun 19, 2025
18c26cb
Update template
github-actions[bot] Jun 19, 2025
fa22072
Only commit if there are changes
denialhaag Jun 19, 2025
31b4801
🎨 pre-commit fixes
pre-commit-ci[bot] Jun 19, 2025
ee9e730
Update template
github-actions[bot] Jun 19, 2025
76165f6
Push something
denialhaag Jun 19, 2025
3e7985d
Update template
github-actions[bot] Jun 19, 2025
e68ab66
Change package name
denialhaag Jun 19, 2025
f028e94
Update template
github-actions[bot] Jun 19, 2025
43b494d
Do not change the package name
denialhaag Jun 19, 2025
1618a02
Update to new action arguments
denialhaag Jun 19, 2025
2392195
Update template
github-actions[bot] Jun 19, 2025
6b64af8
Push something
denialhaag Jun 19, 2025
665b690
Update template
github-actions[bot] Jun 19, 2025
9db8a98
Push something
denialhaag Jun 19, 2025
914e83b
Update template
github-actions[bot] Jun 19, 2025
3fea7dd
Use the new composite action
denialhaag Jun 20, 2025
554e0be
Push something
denialhaag Jun 20, 2025
aadca1c
Push something
denialhaag Jun 20, 2025
e70a26d
Push something
denialhaag Jun 20, 2025
a06dd50
Push something
denialhaag Jun 20, 2025
e0e79a6
Push something
denialhaag Jun 20, 2025
2b43c61
Push something
denialhaag Jun 20, 2025
677dace
Push something
denialhaag Jun 20, 2025
a5cae47
Test if it's finally working
denialhaag Jun 20, 2025
d195ab9
Update template
github-actions[bot] Jun 20, 2025
cd4cf7e
😌 It is working
denialhaag Jun 20, 2025
5e97d79
Update template
github-actions[bot] Jun 20, 2025
f4d7057
Use the action from the new templates repo
denialhaag Jun 20, 2025
4a0f22d
Fix job permissions
denialhaag Jun 20, 2025
1043433
Change something
denialhaag Jun 20, 2025
f8600c4
Push something
denialhaag Jun 20, 2025
510a5ae
Push something
denialhaag Jun 20, 2025
9831c87
Undo change in pull-request template
denialhaag Jun 20, 2025
1e0ccb4
Change something
denialhaag Jun 20, 2025
538f4c6
Change something
denialhaag Jun 20, 2025
9293e50
Push something
denialhaag Jun 20, 2025
4afb6f4
Change something
denialhaag Jun 20, 2025
6375855
Update to new action arguments
denialhaag Jun 23, 2025
b2813cf
Merge branch 'main' into templating
denialhaag Jun 23, 2025
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ on:
push:
branches:
- main
pull_request:
merge_group:
workflow_dispatch:
# pull_request:
# merge_group:
# workflow_dispatch:
Comment on lines +6 to +8
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has to be undone. I did this because I didn't want to block the CI.

Suggested change
# pull_request:
# merge_group:
# workflow_dispatch:
pull_request:
merge_group:
workflow_dispatch:


concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/templating.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Templating
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be moved to the workflows repository as a reusable workflow once we like it. 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. That would be similar to how we are doing that for the MQT Core update workflow
In QCEC: https://github.com/munich-quantum-toolkit/qcec/blob/main/.github/workflows/update-mqt-core.yml
In the workflow repo: https://github.com/munich-quantum-toolkit/workflows/blob/main/.github/workflows/reusable-mqt-core-update.yml
Although I suppose that this will actually be an action instead of a workflow. So it might as well be that we do not add anything to the workflows repository.

Copy link
Collaborator Author

@denialhaag denialhaag Jun 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree; now that the action does everything, we can just copy-paste this file to all repositories where we want to use the action. 👍

on:
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
Comment on lines +2 to +5
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has to change to make the job scheduled.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
on:
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
on:
schedule:
# Run every Monday at 00:00 UTC
- cron: "0 0 * * 1"
pull_request:
paths:
- ".github/workflows/templating.yml"
workflow_dispatch: # Allow manual triggering

I suppose this can be fairly similar to how we handle upstream Qiskit testing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'll commit the suggestion once I'm no longer using this PR as the trigger for testing. 😄


jobs:
render-template:
name: Render template
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: munich-quantum-toolkit/templates@add-action
with:
organization: munich-quantum-toolkit
repository: core
Loading