Merge pull request #208 from owenvoke/bugfix/changelog-action

ci(changelog): fix changelog action
This commit is contained in:
Owen Voke
2020-10-13 11:16:15 +01:00
committed by GitHub

View File

@ -5,6 +5,7 @@ on:
branches: [ master ] branches: [ master ]
paths: paths:
- CHANGELOG.md - CHANGELOG.md
- .github/workflows/changelog.yml
pull_request: pull_request:
branches: [ master ] branches: [ master ]
paths: paths:
@ -17,6 +18,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Checkout website repository - name: Checkout website repository
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
@ -24,11 +26,13 @@ jobs:
repository: pestphp/docs repository: pestphp/docs
path: pestphp-docs path: pestphp-docs
ref: master ref: master
- name: Read CHANGELOG.md - name: Read CHANGELOG.md
id: package id: package
uses: juliangruber/read-file-action@v1 uses: juliangruber/read-file-action@v1
with: with:
path: ./CHANGELOG.md path: ./CHANGELOG.md
- name: Add file headers - name: Add file headers
uses: DamianReeves/write-file-action@v1.0 uses: DamianReeves/write-file-action@v1.0
with: with:
@ -44,14 +48,15 @@ jobs:
Next section: [Upgrade Guide →](/docs/upgrade-guide) Next section: [Upgrade Guide →](/docs/upgrade-guide)
write-mode: overwrite write-mode: overwrite
- name: Copy CHANGELOG to website repository - name: Copy CHANGELOG to website repository
run: cp CHANGELOG.md pestphp-docs/changelog.md run: cp CHANGELOG.md pestphp-docs/changelog.md
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
with: with:
token: ${{ secrets.CHANGELOG_KEY }} token: ${{ secrets.CHANGELOG_KEY }}
commit-message: Update changelog.md commit-message: Update changelog.md
branch: master
committer: GitHub Action <noreply@github.com> committer: GitHub Action <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
title: 'Update changelog.md' title: 'Update changelog.md'