generated from uhm-descartes/ece693bspring2025
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 2.05 KB
/
template_sync.yaml
File metadata and controls
61 lines (53 loc) · 2.05 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# Doc: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
# Workflow to synchronize the local repository with the UHM DESCARTES MOREA Template.
name: Synchronize with Template
on:
# Runs on schedule: 1:00 AM HAST on Monday
schedule:
- cron: "0 11 * * MON"
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allow this workflow to be manually triggered
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
actions: write
contents: write
id-token: write
pull-requests: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "template-sync"
cancel-in-progress: false
# Common Environment Variables for all Steps
env:
SOURCE_BRANCH: main
SOURCE_REPOSITORY: uhm-descartes/morea
jobs:
repo-sync:
runs-on: ubuntu-latest
steps:
# Doc: https://github.com/marketplace/actions/checkout
- name: Checkout Current Repository
id: checkout
uses: actions/checkout@v4
if: github.repository != env.SOURCE_REPOSITORY
with:
token: ${{ secrets.DESCARTES_TOKEN }}
# Doc: https://github.com/marketplace/actions/actions-template-sync
- name: Synchronize
id: synchronize
uses: AndreasAugustin/actions-template-sync@v1.1.8
if: github.repository != env.SOURCE_REPOSITORY
with:
github_token: ${{ secrets.DESCARTES_TOKEN }}
source_repo_path: ${{ env.SOURCE_REPOSITORY }}
upstream_branch: ${{ env.SOURCE_BRANCH }}
pr_title: "[actions-template-sync] Upstream template update"
pr_commit_msg: "chore(template): upstream template update"