Skip to content

Commit

Permalink
docs: update workflow instructions to yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wei authored Aug 9, 2019
1 parent af5d49a commit 87e8502
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,24 @@ A GitHub Action for syncing the current repository using **force push**.

### Github Actions
```
action "repo-sync" {
uses = "wei/github-sync@master"
args = "$SOURCE_REPO $SOURCE_BRANCH:$DESTINATION_BRANCH"
secrets = ["GITHUB_TOKEN"]
env = {
SOURCE_REPO = ""
SOURCE_BRANCH = ""
DESTINATION_BRANCH = ""
}
}
# File: .github/workflows/repo-sync.yml
on:
schedule:
- cron: */15 * * * *
jobs:
repo-sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: repo-sync
uses: wei/github-sync@master
env:
SOURCE_REPO: ""
SOURCE_BRANCH: ""
DESTINATION_BRANCH: ""
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
args: $SOURCE_REPO $SOURCE_BRANCH:$DESTINATION_BRANCH
```
`GITHUB_TOKEN` must be checked under secrets.

Expand Down

0 comments on commit 87e8502

Please sign in to comment.