mirror of
https://github.com/sudoxnym/brands.git
synced 2026-07-14 18:21:52 +00:00
Protect special folders in GitHub Validation Action
This commit is contained in:
parent
be3a87c00a
commit
94f7faef4f
2 changed files with 13 additions and 0 deletions
6
.github/workflows/validate/validate.sh
vendored
6
.github/workflows/validate/validate.sh
vendored
|
|
@ -28,10 +28,16 @@ while read image; do
|
||||||
|
|
||||||
# Extract properties into variables
|
# Extract properties into variables
|
||||||
filename=$(basename "${image}")
|
filename=$(basename "${image}")
|
||||||
|
folderpath=$(dirname "${image}")
|
||||||
|
foldername=$(basename "${folderpath}")
|
||||||
width="${properties[0]}"
|
width="${properties[0]}"
|
||||||
height="${properties[1]}"
|
height="${properties[1]}"
|
||||||
type="${properties[2]}"
|
type="${properties[2]}"
|
||||||
|
|
||||||
|
# Underscore folders are special cases. Instead one should symlink between integration domains
|
||||||
|
[[ "${foldername}" == _* && "${foldername}" != "_placeholder" && "${foldername}" != "_homeassistant" ]] \
|
||||||
|
&& error "${folderpath}" "Directories should not start with an underscore (_), please use the integration domain instead"
|
||||||
|
|
||||||
# Ensure file is actually a PNG file
|
# Ensure file is actually a PNG file
|
||||||
[[ "${type}" != "PNG" ]] \
|
[[ "${type}" != "PNG" ]] \
|
||||||
&& error "${image}" "Invalid file type '${type}' for file"
|
&& error "${image}" "Invalid file type '${type}' for file"
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,13 @@ symlinking domain folders for the same icon/logos is allowed. The deployment
|
||||||
process at our hosting provider will unpack these symlinks to actual files
|
process at our hosting provider will unpack these symlinks to actual files
|
||||||
during the deployment process.
|
during the deployment process.
|
||||||
|
|
||||||
|
Please note, symlinks should only be created between integration domain
|
||||||
|
directories. The `_placeholder` & `_homeassistant` directories are special
|
||||||
|
cases and new directories with an underscore (`_`) should not be created.
|
||||||
|
|
||||||
|
The names of directories must always match the integration domain. Additional
|
||||||
|
directories are not allowed.
|
||||||
|
|
||||||
## Trademark Legal Notices
|
## Trademark Legal Notices
|
||||||
|
|
||||||
All product names, trademarks and registered trademarks in the images in this
|
All product names, trademarks and registered trademarks in the images in this
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue