Skip to content

Commit

Permalink
ci: add filename checks
Browse files Browse the repository at this point in the history
  • Loading branch information
YiPrograms committed Jan 29, 2024
1 parent 0b63ccc commit 49f32d9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/check_filename.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: check_filename
on: [push, pull_request]
jobs:
check_hash:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
sha1sum collection/* | \
perl -nle '
/^(\w{64}) (collection\/(.+)_(.+)\.\w+)$/;
if (lc($1) ne lc($4)) {
print "FAIL: $2 : sha1sum should be $1!";
$err = 1;
};
END {
exit 1 if $err == 1
}'
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- Add your avatar image to the `avatars` folder.
- The image should be named as `<your_name>_<sha1sum>.<ext>`.
- `<your_name>` is your name.
- If your name contains spaces, replace them with underscores (`_`).
- If your name contains spaces, replace them with dashes (`-`).
- `<sha1sum>` is the SHA1 checksum of your avatar image.
- `<ext>` is the extension of the image (e.g., `.jpg`, `.png`, `.gif`)
- Create a pull request to merge your branch into `master`.
Expand Down

0 comments on commit 49f32d9

Please sign in to comment.