fix: extract blog draft from stdout via frontmatter marker #12
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: Require blog label | |
| on: | |
| pull_request: | |
| types: [labeled, unlabeled, opened, synchronize] | |
| permissions: {} | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| # Skip for dependabot / renovate | |
| if: >- | |
| github.actor != 'dependabot[bot]' && | |
| github.actor != 'renovate[bot]' | |
| steps: | |
| - name: Check blog label | |
| env: | |
| LABELS: ${{ toJSON(github.event.pull_request.labels.*.name) }} | |
| run: | | |
| if echo "$LABELS" | grep -qE '"blog:(pending|skip)"'; then | |
| echo "✅ Blog label found" | |
| else | |
| echo "::error::PR に blog:pending または blog:skip ラベルを付けてください" | |
| exit 1 | |
| fi | |
| auto-skip-bots: | |
| runs-on: ubuntu-latest | |
| if: >- | |
| github.actor == 'dependabot[bot]' || | |
| github.actor == 'renovate[bot]' | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| labels: ['blog:skip'] | |
| }); |