|
1 | | -# File: .github/workflows/template-sync.yml |
| 1 | +name: Template Sync |
2 | 2 |
|
3 | 3 | on: |
4 | | - # cronjob trigger |
5 | | -# schedule: |
6 | | -# - cron: "0 0 1 * *" |
7 | | - # manual trigger |
8 | 4 | workflow_dispatch: |
| 5 | + |
9 | 6 | jobs: |
10 | 7 | repo-sync: |
11 | 8 | runs-on: ubuntu-latest |
12 | | - # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs |
13 | 9 | permissions: |
14 | 10 | contents: write |
15 | 11 | pull-requests: write |
16 | 12 |
|
17 | 13 | steps: |
18 | | - # To use this repository's private action, you must check out the repository |
19 | 14 | - name: Checkout |
20 | 15 | uses: actions/checkout@v4 |
21 | | - # https://github.com/actions/checkout#usage |
22 | | - # uncomment if you use submodules within the repository |
23 | | - # with: |
24 | | - # submodules: true |
25 | 16 |
|
26 | | - - name: actions-template-sync |
| 17 | + - name: Template Sync |
27 | 18 | uses: AndreasAugustin/actions-template-sync@v2 |
28 | 19 | with: |
29 | 20 | source_repo_path: OGCraftMC/Datapack-Template |
30 | | - upstream_branch: <target_branch> # defaults to main |
31 | | - create_pull_request: false |
| 21 | + upstream_branch: main # change if not main |
| 22 | + pr_branch_name_prefix: chore/template_sync |
| 23 | + pr_title: upstream merge template repository |
| 24 | + pr_labels: template_sync |
| 25 | + pr_commit_msg: chore(template): merge template changes :up: |
| 26 | + env: |
| 27 | + SOURCE_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 28 | + TARGET_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
32 | 29 |
|
33 | | - - name: Create Pull Request |
| 30 | + - name: Create Pull Request (fallback) |
34 | 31 | uses: peter-evans/create-pull-request@v6 |
35 | 32 | with: |
36 | 33 | token: ${{ secrets.GITHUB_TOKEN }} |
37 | | - commit-message: chore: template sync |
38 | | - title: chore: template sync |
| 34 | + commit-message: chore(template): merge template changes :up: |
| 35 | + title: upstream merge template repository |
39 | 36 | body: | |
40 | | - Automated sync from template. |
| 37 | + This PR was created automatically by the template sync workflow. |
41 | 38 | branch: chore/template_sync |
42 | 39 | delete-branch: false |
43 | 40 | labels: template_sync |
0 commit comments