Skip to content

yiyungent/clear-image-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

clear-image-action

🔧 Image detection. | 图片检测 | GitHub Actions

repo size LICENSE QQ Group

注意: 本项目采用 Star License + MIT License, 你必须 Star 本项目 才能在你的仓库中运行本 GitHub Action

介绍

使用 GitHub Action 自动检测你仓库内 由于误删,图床失效等导致的引用无效,让你第一时间了解丢失了哪些图片;自动清理无用冗余垃圾图片,无需再手动管理图片, 清除无用图片。

功能

  • 自动扫描仓库指定文件夹, 发起 Pull Request: 图片扫描报告
  • 清理未引用图片
    • Pull Request 形式发起, 只有你同意合并后, 清理才生效
  • 检查 引用的图片 是否有效
    • 检查 引用的本地图片 是否存在
    • 检查 引用的网络图片 是否有效 (200 非 404)

使用

创建 clear-image.yml

.github/workflows/clear-image.yml

name: clear-image

on:
  push:
    branches: [main] # 注意更改为你的 branch, 例如 master

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout source
        uses: actions/checkout@v2

      - name: Clear image
        uses: yiyungent/clear-image-action@main
        with:
          # 默认为空, 即为仓库根目录
          scan_directory: ""
          # 多个路径之间用 英文逗号 , 隔开, 用相对于仓库根目录的 相对路径
          ignore_paths: ""

Screenshots

部分 Pull Request 截图

Related Projects

Donate

clear-image-action is an MIT licensed open source project and completely free to use. However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing.

We accept donations through these channels:

Author

clear-image-action © yiyun, Released under the MIT License.
Authored and maintained by yiyun with help from contributors (list).

GitHub @yiyungent Gitee @yiyungent

About

🔧 Image detection. | 图片检测 | 清理未引用图片 | 删除未引用图片 | 检查引用的图片是否有效 | GitHub Actions

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published