CI: Ensure changelogs are prettified prior to commit (#92580)

* Ensure changelogs are prettified prior to commit

* Remove cache property

* Include .yarn directory

* Include packages directory

* Try just using npx

* Update workflows
pull/92917/head
Andreas Christou 10 months ago committed by GitHub
parent 14e1403b9e
commit 8daa6f1f30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 13
      .github/workflows/changelog.yml
  2. 8
      .github/workflows/release-pr.yml

@ -74,8 +74,15 @@ jobs:
sparse-checkout: |
.github/workflows
CHANGELOG.md
.nvmrc
.prettierignore
.prettierrc.js
fetch-depth: 0
fetch-tags: true
- name: Setup nodejs environment
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: "Configure git user"
run: |
git config --local user.name "github-actions[bot]"
@ -120,9 +127,11 @@ jobs:
fi
git diff CHANGELOG.md
git add CHANGELOG.md
- name: "Prettify CHANGELOG.md"
run: npx prettier --write CHANGELOG.md
- name: "Commit changelog changes"
run: git commit --allow-empty -m "Update changelog" CHANGELOG.md
run: git add CHANGELOG.md && git commit --allow-empty -m "Update changelog" CHANGELOG.md
- name: "git push"
if: ${{ inputs.dry_run }} != true
run: git push

@ -74,6 +74,10 @@ jobs:
fetch-depth: '0'
fetch-tags: 'false'
path: .grafana-main
- name: Setup nodejs environment
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Configure git user
run: |
git config --local user.name "github-actions[bot]"
@ -120,7 +124,9 @@ jobs:
rm -f CHANGELOG.part changelog_items.md
git diff CHANGELOG.md
- name: "Prettify CHANGELOG.md"
run: npx prettier --write CHANGELOG.md
- name: Commit CHANGELOG.md changes
run: git add CHANGELOG.md && git commit --allow-empty -m "Update changelog" CHANGELOG.md

Loading…
Cancel
Save