Make the export button work #8
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: Lint | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# Install asdf version manager to reuse the versions declared in .tool-versions | |
- name: Install asdf and tools | |
uses: asdf-vm/actions/install@v3 | |
- name: Install Dependencies | |
run: npm install | |
- name: Lint | |
run: npx eslint | |
- name: Diff | |
if: ${{ failure() }} | |
run: | | |
npx eslint --fix | |
git diff HEAD > eslint-fixes.patch | |
- uses: actions/upload-artifact@v4 | |
if: ${{ failure() }} | |
with: | |
name: eslint fixes | |
path: eslint-fixes.patch | |
- name: Write to job summary | |
if: ${{ failure() }} | |
run: | | |
echo '```diff' >> $GITHUB_STEP_SUMMARY | |
cat eslint-fixes.patch >> $GITHUB_STEP_SUMMARY | |
echo '' >> $GITHUB_STEP_SUMMARY | |
echo '```' >> $GITHUB_STEP_SUMMARY |