-
Notifications
You must be signed in to change notification settings - Fork 123
37 lines (35 loc) · 1.17 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
name: sync
on:
schedule:
- cron: '*/5 * * * *'
jobs:
examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: examples
- uses: actions/checkout@v3
with:
repository: pipe-cd/pipecd
path: pipecd
- run: |
git -C pipecd rev-parse HEAD > examples/HEAD.txt
cd examples
rm -rf cloudrun deployment-chain ecs kubernetes lambda local-modules terraform
cp -rf ../pipecd/examples/cloudrun .
cp -rf ../pipecd/examples/deployment-chain .
cp -rf ../pipecd/examples/ecs .
cp -rf ../pipecd/examples/kubernetes .
cp -rf ../pipecd/examples/lambda .
cp -rf ../pipecd/examples/local-modules .
cp -rf ../pipecd/examples/terraform .
cp -rf ../pipecd/examples/README.remote.md README.md
if [[ -z `git status --porcelain` ]]; then
exit
fi
git config user.name pipecd-bot
git config user.email 62555040+pipecd-bot@users.noreply.github.com
git add .
git commit -m "Sync with pipe-cd/pipecd repository at $(<HEAD.txt)"
git push