Switch to using release notes file to determine current version #24
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
name: Check Pull Request for QA Issues | |
on: | |
pull_request: | |
jobs: | |
check_release_notes: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout pull request branch | |
uses: actions/checkout@v4 | |
- name: Add official Aspen Discovery repo as another remote | |
run: git remote add official https://github.com/Aspen-Discovery/aspen-discovery.git && git fetch official | |
- name: Get default branch | |
id: get_default_branch | |
run: | | |
default_branch=$(curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/Aspen-Discovery/aspen-discovery | jq -r .default_branch) | |
echo "Default branch is $default_branch" | |
echo "DEFAULT_BRANCH=$default_branch" >> $GITHUB_ENV | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check for changes in release notes | |
run: | | |
if git diff --name-only official/$DEFAULT_BRANCH HEAD | grep -q 'code/web/release_notes/'; then | |
echo "Release notes have been modified." | |
else | |
echo "No changes detected in the release notes." | |
exit 1 | |
fi |