更新 action.yaml

This commit is contained in:
hy 2024-04-26 18:08:51 +08:00
parent 7ab983ceb0
commit b93d16c727
1 changed files with 5 additions and 5 deletions

View File

@ -22,12 +22,12 @@ runs:
res=""
fileStr =${{inputs.file_array}}
# 读取 fileStr 变量中的每一行文件路径
while IFS= read -r filepath; do
# 获取文件的 MD5 哈希值
echo -e "$fileStr" | while IFS= read -r filepath; do
# 获取文件的哈希值,这里使用 MD5 作为例子
file_hash=$(md5sum "$filepath" | awk '{print $1}')
# 将哈希值追加到 res 变量中
res+="$file_hash"
done <<< "$fileStr"
# 将哈希值追加到 res 变量中,使用换行符分隔
res+="$file_hash"
done
# 计算 res 的哈希值
final_hash=$(echo -n "$res" | md5sum | awk '{print $1}')