blurhash の実装をしようとしました。 #43
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: Build check | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| jobs: | |
| build-check: | |
| name: build-check | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| contents: read | |
| issues: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v2 | |
| with: | |
| version: 8 | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build | |
| id: build | |
| run: | | |
| set -o pipefail | |
| pnpm build 2>&1 | tee build.log | |
| continue-on-error: true | |
| - name: Post failure to PR | |
| if: steps.build.outcome == 'failure' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const log = fs.readFileSync('build.log', 'utf8'); | |
| const truncated = log.length > 6500 ? log.slice(-6500) : log; | |
| const comment = [ | |
| '🚨 **Build failed**', | |
| '', | |
| '```', | |
| truncated, | |
| '```' | |
| ].join('\n'); | |
| github.rest.issues.createComment({ | |
| issue_number: context.payload.pull_request.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: comment | |
| }); | |
| - name: failure | |
| if: steps.build.outcome == 'failure' | |
| run: exit 1 |