Skip to content

Commit

Permalink
[#98] new approach
Browse files Browse the repository at this point in the history
  • Loading branch information
rpbaltazar committed Jul 17, 2020
1 parent d7aa7f7 commit 0da6b76
Showing 1 changed file with 25 additions and 17 deletions.
42 changes: 25 additions & 17 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0da6b76

Please sign in to comment.