Taskboard UI tweaks #464
Workflow file for this run
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: Style Check | |
on: | |
pull_request: | |
branches: ["main"] | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
env: | |
SKIP_ENV_VALIDATION: "1" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
- run: npm ci | |
- name: Run style check and capture output | |
run: | | |
set +e | |
npm run style:all 2> style_output.txt | |
exit_status=$? | |
set -e | |
if [ $exit_status -ne 0 ]; then | |
echo "Style check failed, exit status: $exit_status" | |
echo "style_output<<EOF" >> $GITHUB_ENV | |
cat style_output.txt >> $GITHUB_ENV | |
echo "EOF" >> $GITHUB_ENV | |
exit $exit_status | |
fi | |
- name: Comment PR on style check failure | |
if: failure() | |
uses: thollander/actions-comment-pull-request@v1 | |
with: | |
message: | | |
Style check failed. Here are the details: | |
``` | |
${{ env.style_output }} | |
``` | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |