-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
baa9975
commit 6db829e
Showing
1 changed file
with
25 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,23 +33,31 @@ jobs: | |
git config --local user.name "$ACTION_USERNAME" | ||
git add CHANGELOG.md && git commit -m 'Updated CHANGELOG.md' && echo ::set-env name=push::1 || echo "No changes to CHANGELOG.md" | ||
- name: Push changelog to master | ||
if: env.push == 1 | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.CHANGELOG_GITHUB_TOKEN }} | ||
branch: master | ||
|
||
- name: Cherry-pick changelog to development | ||
- name: Push changes | ||
if: env.push == 1 | ||
env: | ||
ACTION_EMAIL: [email protected] | ||
ACTION_USERNAME: GitHub Action | ||
# CI_USER: ${{ secrets.YOUR_GITHUB_USER }} | ||
CI_TOKEN: ${{ secrets.CHANGELOG_GITHUB_TOKEN }} | ||
run: | | ||
git config --local user.email "$ACTION_EMAIL" | ||
git config --local user.name "$ACTION_USERNAME" | ||
commit_hash=`git show HEAD | egrep commit\ .+$ | cut -d' ' -f2` | ||
git checkout development | ||
git pull | ||
git cherry-pick $commit_hash | ||
git push | ||
git push "https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git" HEAD:master | ||
# - name: Push changelog to master | ||
# if: env.push == 1 | ||
# uses: ad-m/github-push-action@master | ||
# with: | ||
# github_token: ${{ secrets.CHANGELOG_GITHUB_TOKEN }} | ||
# branch: master | ||
|
||
# - name: Cherry-pick changelog to development | ||
# if: env.push == 1 | ||
# env: | ||
# ACTION_EMAIL: [email protected] | ||
# ACTION_USERNAME: GitHub Action | ||
# run: | | ||
# git config --local user.email "$ACTION_EMAIL" | ||
# git config --local user.name "$ACTION_USERNAME" | ||
# commit_hash=`git show HEAD | egrep commit\ .+$ | cut -d' ' -f2` | ||
# git checkout development | ||
# git pull | ||
# git cherry-pick $commit_hash | ||
# git push |