Skip to content

Commit

Permalink
Merge pull request #208 from owenvoke/bugfix/changelog-action
Browse files Browse the repository at this point in the history
ci(changelog): fix changelog action
  • Loading branch information
owenvoke authored Oct 13, 2020
2 parents c3616ed + 6671b26 commit e4f5a28
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ master ]
paths:
- CHANGELOG.md
- .github/workflows/changelog.yml
pull_request:
branches: [ master ]
paths:
Expand All @@ -17,18 +18,21 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Checkout website repository
uses: actions/checkout@v2
with:
token: ${{ secrets.CHANGELOG_KEY }}
repository: pestphp/docs
path: pestphp-docs
ref: master

- name: Read CHANGELOG.md
id: package
uses: juliangruber/read-file-action@v1
with:
path: ./CHANGELOG.md

- name: Add file headers
uses: DamianReeves/write-file-action@v1.0
with:
Expand All @@ -44,14 +48,15 @@ jobs:
Next section: [Upgrade Guide →](/docs/upgrade-guide)
write-mode: overwrite

- name: Copy CHANGELOG to website repository
run: cp CHANGELOG.md pestphp-docs/changelog.md

- name: Create Pull Request
uses: peter-evans/create-pull-request@v2
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.CHANGELOG_KEY }}
commit-message: Update changelog.md
branch: master
committer: GitHub Action <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
title: 'Update changelog.md'
Expand Down

0 comments on commit e4f5a28

Please sign in to comment.