Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Bump JamesIves/github-pages-deploy-action from 4.4.3 to 4.5.0 #8

Bump JamesIves/github-pages-deploy-action from 4.4.3 to 4.5.0

Bump JamesIves/github-pages-deploy-action from 4.4.3 to 4.5.0 #8

name: check file encodings in PR
on: [pull_request]
jobs:
file-encoding:
name: file encoding check
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: run the checkout action
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: list all changed files
run: |
files=$(git diff --name-only origin/$GITHUB_BASE_REF...${{ github.sha }})
IFS=$'\n'; files=($files); unset IFS; # split the string into an array
file --mime "${files[@]}"
- name: list all changed files with the wrong encoding
run: |
files=$(git diff --name-only origin/$GITHUB_BASE_REF...${{ github.sha }})
IFS=$'\n'; files=($files); unset IFS; # split the string into an array
! file --mime "${files[@]}" | grep -v "charset=utf-8\|charset=us-ascii\|charset=binary\| (No such file or directory)$"