2024-05-04 13:10:06 +00:00
|
|
|
name: UpdateCache
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ] # 触发分支,根据需要可更改为'master'或其他分支
|
|
|
|
jobs:
|
|
|
|
notify:
|
|
|
|
runs-on: ubuntu-latest # 使用Ubuntu环境执行
|
|
|
|
steps:
|
2024-05-26 11:24:39 +00:00
|
|
|
- name: Check pushed files
|
|
|
|
id: check_files
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
shopt -s nocasematch
|
|
|
|
supported_extensions=(".png" ".jpg" ".jpeg" ".gif")
|
|
|
|
changed_files=$(git diff-tree --no-commit-id --name-only -r $GITHUB_SHA)
|
|
|
|
for file in $changed_files; do
|
|
|
|
for extension in "${supported_extensions[@]}"; do
|
|
|
|
if [[ $file == *"$extension" ]]; then
|
|
|
|
echo "File $file matches a supported extension"
|
|
|
|
echo "::set-output name=has_supported_file::true"
|
|
|
|
break 2
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
|
|
|
shopt -u nocasematch
|
|
|
|
- name: Check Support Update Cache
|
|
|
|
if: steps.check_files.outputs.has_supported_file == 'true'
|
2024-05-04 13:10:06 +00:00
|
|
|
run: |
|
2024-05-12 04:54:49 +00:00
|
|
|
curl https://apis.bmclapi.online/api/93/refreshcache
|
2024-05-26 11:24:39 +00:00
|
|
|
curl https://ttb-network.top:8800/mirrors/bangbang93hub/refresh
|