Skip to content

Commit

Permalink
Create a workflow for checks on static files
Browse files Browse the repository at this point in the history
  • Loading branch information
abhahn committed Jun 22, 2024
1 parent e9c8954 commit 4909b01
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/check-static-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Check changes to static files

on:
pull_request:
branches:
- main

jobs:
changed_files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: List changed frontend source files
uses: tj-actions/changed-files@v44
id: changed-frontend-src-files
with:
files: |
frontend/src/**/*.tsx
frontend/src/**/*.css
- name: List changed frontend static files
id: changed-frontend-static-files
if: steps.changed-frontend-src-files.outputs.files_changed == 'true'
uses: tj-actions/changed-files@v44
with:
files: |
static
- name: Check changed static files
if: steps.changed-frontend-src-files.outputs.files_changed == 'true' && steps.changed-frontend-static-files.outputs.files_changed == 'false'
run: echo "There were changes to the frontend code, but no corresponding changes to static files. Please build the project locally, commit the static file changes and push the changes to try again." && exit 1

- name: List logo customizations
uses: tj-actions/changed-files@v44
id: changed-logo-files
with:
files: |
frontend/public/favicon.ico
frontend/src/assets
- name: Check logo customizations
if: steps.changed-logo-files.outputs.any_changed == 'true'
run: echo "Logos are customized, which is not a supported change." && exit 1

0 comments on commit 4909b01

Please sign in to comment.