Skip to content

Commit

Permalink
Ensure the file exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeglius committed Dec 8, 2024
1 parent 1c6f9aa commit 4a09fb6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/upload_sysext/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ runs:
for pattern in $INPUT_FILES
do
for file in $pattern; do
# Check the fike exists
if [[ ! -f $file ]]; then
echo "File $file does not exist"
exit 1
fi
# Check extension type
is_sysext=$(sudo systemd-dissect --json=short "$file" | jq -r '.useSystemExtension == true')
is_confext=$(sudo systemd-dissect --json=short "$file" | jq -r '.useConfigurationExtension == true')
Expand Down

0 comments on commit 4a09fb6

Please sign in to comment.