Skip to content

Commit

Permalink
feat: update workflow syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
wei committed Aug 11, 2019
1 parent 87e8502 commit 1863f82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,15 @@ jobs:
steps:
- uses: actions/checkout@master
- name: repo-sync
uses: wei/github-sync@master
uses: wei/github-sync@v1
env:
SOURCE_REPO: ""
SOURCE_BRANCH: ""
DESTINATION_BRANCH: ""
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
args: $SOURCE_REPO $SOURCE_BRANCH:$DESTINATION_BRANCH
with:
args: $SOURCE_REPO $SOURCE_BRANCH:$DESTINATION_BRANCH
```
`GITHUB_TOKEN` must be checked under secrets.

If `SOURCE_REPO` is private or with another provider, either (1) use an authenticated HTTPS repo clone url like `https://username:[email protected]/username/repository.git` or (2) set a `SSH_PRIVATE_KEY` secret and use the SSH clone url


Expand Down
1 change: 1 addition & 0 deletions github-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ fi
echo "UPSTREAM_REPO=$UPSTREAM_REPO"
echo "BRANCHES=$BRANCH_MAPPING"

git remote set-url origin "https://$OWNER:$GITHUB_TOKEN@github.com/$OWNER/$REPO.git"
git remote add upstream "$UPSTREAM_REPO"
git fetch upstream
git remote -v
Expand Down

0 comments on commit 1863f82

Please sign in to comment.