-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (41 loc) · 1.64 KB
/
Copy pathupdater.yml
File metadata and controls
49 lines (41 loc) · 1.64 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
name: Update Target Repositories
on:
push:
branches:
- main
jobs:
update-repos:
runs-on: ubuntu-latest
steps:
- name: Checkout main repository
uses: actions/checkout@v3
- name: Checkout target repository 1
uses: actions/checkout@v3
with:
repository: team-dev-docs/devdocsprod-dev-docs
path: target-repo-1
- name: Checkout target repository 2
uses: actions/checkout@v3
with:
repository: team-dev-docs/starter-template
path: target-repo-2
- name: Copy files to target repositories
run: |
find . -path "./.git" -prune -o -path "./docs" -prune -o -path "./blog" -prune -o -type f -exec cp --parents {} target-repo-1/ \;
find . -path "./.git" -prune -o -path "./docs" -prune -o -path "./blog" -prune -o -type f -exec cp --parents {} target-repo-2/ \;
- name: Create pull request in target repository 1
uses: peter-evans/create-pull-request@v4
with:
path: target-repo-1
title: Update from main repository
branch: update-from-main
commit-message: Update files from main repository
body: This pull request updates all files and folders from the main repository, except for the docs and blog folders.
- name: Create pull request in target repository 2
uses: peter-evans/create-pull-request@v4
with:
path: target-repo-2
title: Update from main repository
branch: update-from-main
commit-message: Update files from main repository
body: This pull request updates all files and folders from the main repository, except for the docs and blog folders.