创建 GitHub Action 动作并复制以下命令

name: image
on:
  pull_request:
    paths:
      - 'static/**'
jobs:
  compress:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          ref: ${{ github.head_ref }}
      - uses: namoscato/action-tinify@v1
        with:
          api_key: ${{ secrets.TINIFY_API_KEY }}
          github_token: ${{ secrets.GITHUB_TOKEN }}
input description
api_key Tinify API key (create one here)
github_token GITHUB_TOKEN秘密

标签: GIT, Github, 图片优化

已有 3 条评论

  1. Good post. I learn something new and challenging on sites I stumbleupon everyday. Its always interesting to read articles from other authors and practice something from other sites.

  2. Next time I read a blog, I hope that it doesnt disappoint me as much as this particular one. I mean, Yes, it was my choice to read through, but I really thought you would have something helpful to say. All I hear is a bunch of crying about something that you can fix if you were not too busy seeking attention.

  3. ? Artificial intelligence creates content for the site, no worse than a copywriter, you can also use it to write articles. 100% uniqueness :). Click Here:? https://stanford.io/3FXszd0

添加新评论