Fix snackbar changing color when spamming #174
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: Frontend PR validation | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "canopeum_frontend/**" | |
- ".github/workflows/canopeum_frontend_pr_validation.yml" | |
pull_request: | |
branches: | |
- main | |
- production | |
paths: | |
- "canopeum_frontend/**" | |
- ".github/workflows/canopeum_frontend_pr_validation.yml" | |
jobs: | |
Lint-Autofixes: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: canopeum_frontend | |
# Only run autofixes on PRs | |
if: ${{ github.event_name == 'pull_request' }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
# Token with Contents permissions to allow retriggering workflow | |
token: ${{ secrets.PR_AUTOFIX_PAT }} | |
- uses: actions/setup-node@v4 | |
- run: npm ci | |
- run: npm run lint:fix | |
- name: Commit autofixes | |
uses: EndBug/add-and-commit@v9 | |
# TODO: Prevent infinite loops, github.event.head_commit.author.name is not accessible in this context | |
# if: ${{ github.event.head_commit.author.name != 'github-actions' }} | |
# Push autofixes even on failure | |
if: ${{ !cancelled() }} | |
with: | |
default_author: github_actions | |
Build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: canopeum_frontend | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
- run: npm ci | |
- run: npm run build |