From 87e8502df2b7544ff5ca445975c84970eaf59a83 Mon Sep 17 00:00:00 2001 From: Wei He Date: Thu, 8 Aug 2019 23:27:16 -0400 Subject: [PATCH] docs: update workflow instructions to yml --- README.md | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index b4637db3f..9cd47489c 100644 --- a/README.md +++ b/README.md @@ -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.