Skip to content

Commit

Permalink
use script for comparing
Browse files Browse the repository at this point in the history
  • Loading branch information
oliversun9 committed Nov 8, 2023
1 parent d8a5346 commit de9b7b2
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/verify_changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,17 @@ on:
push:
branches:
- "release/**"
- "next/**"

jobs:
verify:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || startsWith(github.head_ref, 'release/') }}
if: ${{ github.event_name == 'push' || startsWith(github.head_ref, 'release/') || startsWith(github.head_ref, 'next/')}}
steps:
- name: Checkout repository code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Check changelog is modified
run: |
files=`(git fetch origin main:main) && (git diff --name-only main)`
for file in $files; do
if [ "$file" = "CHANGELOG.md" ]; then
exit 0
fi
done
echo ERROR: CHANGELOG has not been updated
exit 1
- name: Check changelog is Modified
run: bash make/buf/scripts/verifychangelog.bash

0 comments on commit de9b7b2

Please sign in to comment.