Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3557d9c

Browse files
Add sync workflow to SpringBootVulExploit on Thu Jun 1 08:05:52 CEST 2023
1 parent 911264a commit 3557d9c

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

‎.github/workflows/sync.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,34 @@
11
# Your GitHub Actions workflow
2+
name: Sync Repositories
3+
4+
on:
5+
schedule:
6+
- cron: '0 0 * * *' # Runs every day at midnight
7+
8+
jobs:
9+
sync:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Source Repo
13+
uses: actions/checkout@v2
14+
with:
15+
repository: 'src_user/src_repo'
16+
token: ${{ secrets.YOUR_GITHUB_TOKEN }}
17+
path: src_repo
18+
19+
- name: Checkout Destination Repo
20+
uses: actions/checkout@v2
21+
with:
22+
repository: 'dest_user/dest_repo'
23+
token: ${{ secrets.YOUR_GITHUB_TOKEN }}
24+
path: dest_repo
25+
26+
- name: Sync Repositories
27+
run: |
28+
rsync -a --delete src_repo/ dest_repo/
29+
cd dest_repo
30+
git config user.name 'Your Name'
31+
git config user.email 'your-email@example.com'
32+
git add .
33+
git commit -m "Sync with source repo"
34+
git push

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /