mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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
This commit is contained in:
parent
14e1403b9e
commit
8daa6f1f30
13
.github/workflows/changelog.yml
vendored
13
.github/workflows/changelog.yml
vendored
@ -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
|
||||
|
8
.github/workflows/release-pr.yml
vendored
8
.github/workflows/release-pr.yml
vendored
@ -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…
Reference in New Issue
Block a user