From 3728bd8e0fa912016d4a5ac542c48b91b279a17c Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Tue, 13 Oct 2020 11:12:06 +0100 Subject: [PATCH 1/2] ci(changelog): update formatting and run on change --- .github/workflows/changelog.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 25c568b08..c333e3e54 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -5,6 +5,7 @@ on: branches: [ master ] paths: - CHANGELOG.md + - .github/workflows/changelog.yml pull_request: branches: [ master ] paths: @@ -17,6 +18,7 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Checkout website repository uses: actions/checkout@v2 with: @@ -24,11 +26,13 @@ jobs: 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: @@ -44,8 +48,10 @@ 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 with: From 6671b266da72b4ebe4fed7a3fba05fbdd4214f6c Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Tue, 13 Oct 2020 11:12:34 +0100 Subject: [PATCH 2/2] ci(changelog): fix issue with branch and update to v3 --- .github/workflows/changelog.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index c333e3e54..21ad937ac 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -53,11 +53,10 @@ jobs: 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 author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> title: 'Update changelog.md'