更新 action.yaml
This commit is contained in:
parent
b93d16c727
commit
4ddd5cf9c0
10
action.yaml
10
action.yaml
|
|
@ -20,14 +20,12 @@ runs:
|
||||||
run: |
|
run: |
|
||||||
# 初始化 res 变量
|
# 初始化 res 变量
|
||||||
res=""
|
res=""
|
||||||
fileStr =${{inputs.file_array}}
|
fileStr = (${INPUT_FILE_ARRAY//,/ })
|
||||||
# 读取 fileStr 变量中的每一行文件路径
|
# 读取 fileStr 变量中的每一行文件路径
|
||||||
echo -e "$fileStr" | while IFS= read -r filepath; do
|
for filepath in ${fileStr[@]}; do
|
||||||
# 获取文件的哈希值,这里使用 MD5 作为例子
|
file_hash=$(md5sum "$filepath" | awk '{print $1}')
|
||||||
file_hash=$(md5sum "$filepath" | awk '{print $1}')
|
|
||||||
# 将哈希值追加到 res 变量中,使用换行符分隔
|
|
||||||
res+="$file_hash"
|
res+="$file_hash"
|
||||||
done
|
done
|
||||||
|
|
||||||
# 计算 res 的哈希值
|
# 计算 res 的哈希值
|
||||||
final_hash=$(echo -n "$res" | md5sum | awk '{print $1}')
|
final_hash=$(echo -n "$res" | md5sum | awk '{print $1}')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue