Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a GitHub CI to check sorting HttpsExclusions #596

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
31 changes: 31 additions & 0 deletions .github/workflows/sort.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Sort HttpsExclusions

on:
push:
branches:
- master
paths:
- "**/*.txt"
pull_request:
branches:
- master
paths:
- "**/*.txt"

jobs:
bank:
name: Check that bank.txt is sorted
runs-on: ubuntu-latest
steps:
- name: Check out to repository
uses: actions/checkout@v4
- name: Run sort
run: sort exclusions/banks.txt -o exclusions/banks.txt
shell: bash
- name: Remove last empty line
run: truncate -s-1 exclusions/banks.txt
shell: bash
- name: Run git diff to detect the ordering issue
run: |
! git diff --stat | grep -E "[A-Za-z0-9-]+\.txt"
shell: bash