Skip to content

Commit 87e8502

Browse files
authored
docs: update workflow instructions to yml
1 parent af5d49a commit 87e8502

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,24 @@ A GitHub Action for syncing the current repository using **force push**.
1414

1515
### Github Actions
1616
```
17-
action "repo-sync" {
18-
uses = "wei/github-sync@master"
19-
args = "$SOURCE_REPO $SOURCE_BRANCH:$DESTINATION_BRANCH"
20-
secrets = ["GITHUB_TOKEN"]
21-
env = {
22-
SOURCE_REPO = ""
23-
SOURCE_BRANCH = ""
24-
DESTINATION_BRANCH = ""
25-
}
26-
}
17+
# File: .github/workflows/repo-sync.yml
18+
19+
on:
20+
schedule:
21+
- cron: */15 * * * *
22+
jobs:
23+
repo-sync:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@master
27+
- name: repo-sync
28+
uses: wei/github-sync@master
29+
env:
30+
SOURCE_REPO: ""
31+
SOURCE_BRANCH: ""
32+
DESTINATION_BRANCH: ""
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
args: $SOURCE_REPO $SOURCE_BRANCH:$DESTINATION_BRANCH
2735
```
2836
`GITHUB_TOKEN` must be checked under secrets.
2937

0 commit comments

Comments
 (0)