-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Internal] Add workflow to validate NEXT_CHANGELO.go updates
- Loading branch information
1 parent
3746ee4
commit ca146bd
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Check for NEXT_CHANGELOG.go Changes | ||
|
||
on: | ||
pull_request: # Trigger on pull request events | ||
|
||
jobs: | ||
check-next-changelog: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: List all changed files in the PR | ||
id: changed-files | ||
run: | | ||
# Get the list of changed files in the entire PR | ||
echo "files=$(jq -r '.pull_request.files[].filename' < "${{ github.event_path }}")" >> $GITHUB_ENV | ||
- name: Verify NEXT_CHANGELOG.go was modified | ||
run: | | ||
# Check if NEXT_CHANGELOG.go exists in the list of changed files | ||
echo "$GITHUB_ENV" | ||
if [[ ! "$files" =~ NEXT_CHANGELOG\.go ]]; then | ||
echo "WARNING: file NEXT_CHANGELOG.go not modified in this PR.\ | ||
This is just a reminder and does not block the PR from merging." | ||
exit 1 | ||
fi |