Skip to content

ci: debug changelog check with rev-parse #8

ci: debug changelog check with rev-parse

ci: debug changelog check with rev-parse #8

Workflow file for this run

name: Changelog Check
on:
pull_request:
branches:
- main
- v0.9.x
- v0.10.x
jobs:
check_changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Debug git refs
run: |
git fetch origin ${{ github.event.pull_request.base.ref }}
git log
echo original HEAD
echo ${{ github.event.pull_request.head.sha }}
echo HEAD
git rev-parse HEAD
echo origin/${{ github.event.pull_request.base.ref }}
git rev-parse origin/${{ github.event.pull_request.base.ref }}
- name: Check for updated CHANGELOG.md
run: |
git fetch origin ${{ github.event.pull_request.base.ref }}
echo "diffing HEAD and HEAD^1"
git diff HEAD HEAD^1
echo "diffing HEAD and HEAD^2"
git diff HEAD HEAD^2
if git diff --name-only origin/${{ github.event.pull_request.base.ref }}...HEAD | grep -q 'CHANGELOG.md'; then
echo "CHANGELOG.md has been updated."
else
echo "CHANGELOG.md has not been updated."
exit 1
fi