-
Notifications
You must be signed in to change notification settings - Fork 4
44 lines (40 loc) · 1.81 KB
/
sync.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Sync Template
on:
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
# for now, pin cookiecutter version, due to https://github.com/cruft/cruft/issues/166
run: python -m pip install --upgrade cruft "cookiecutter<2" pre-commit toml
- name: Find Latest Tag
uses: oprypin/[email protected]
id: get-latest-tag
with:
repository: scverse/cookiecutter-scverse
releases-only: false
sort-tags: true
regex: '^v\d+\.\d+\.\d+$' # vX.X.X
- name: Sync
run: |
cruft update --checkout ${{ steps.get-latest-tag.outputs.tag }} --skip-apply-ask --project-dir .
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: Automated template update from cookiecutter-scverse
branch: template-update
title: Automated template update from cookiecutter-scverse
body: |
A new version of the [scverse cookiecutter template](https://github.com/scverse/cookiecutter-scverse/releases)
got released. This PR adds all new changes to your repository and helps to to stay in sync with
the latest best-practice template maintained by the scverse team.
**If a merge conflict arised, a `.rej` file with the rejected patch is generated. You'll need to
manually merge these changes.**
For more information about the template sync, please refer to the
[template documentation](https://cookiecutter-scverse-instance.readthedocs.io/en/latest/developer_docs.html#automated-template-sync).