devex: changelog system #9
Workflow file for this run
This file contains hidden or 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: Changelog Check | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| jobs: | |
| check: | |
| name: Check for changelog | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: 📥 Check out code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: 🔍 Check for changelog fragments | |
| id: changelog | |
| run: | | |
| CHANGED_FILES=$(git diff --name-only --diff-filter=A origin/${{ github.event.pull_request.base.ref }}...HEAD -- '.github/changelog/*.yml') | |
| if [ -z "$CHANGED_FILES" ]; then | |
| echo "found=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "found=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: 💬 Update PR Health | |
| uses: ./.github/actions/pr-health-comment | |
| with: | |
| section: changelog | |
| content: "${{ steps.changelog.outputs.found == 'true' && '✅ changelog' || '⚠️ changelog • `pnpm changelog <product> \"description\"`' }}" | |
| github-token: ${{ secrets.GITHUB_TOKEN }} |