[Purge Cache] 请求立即更新缓存 #964
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Purge CDN Cache | |
on: | |
issues: | |
types: [opened] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Purge CDN Cache | |
run: | | |
export CI_RESPONSE=`curl -d "bucket=gems-ruby-china&urls=https://gems.ruby-china.com/versions" -H "Authorization: Bearer ${{ secrets.UPYUN_ACCESS_TOKEN }}" https://api.upyun.com/purge` | |
echo $CI_RESPONSE | |
- name: Report result | |
uses: roots/[email protected] | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
issue-close-message: "[RubyGems 镜像](https://gems.ruby-china.com) 缓存强制刷新成功!\n\n @${issue.user.login} 现在你可以用 Bundler 获取到任何 Gem 的最新版本了,比如 \\`bundle update your-gem\\`。" | |
issue-pattern: ".*Cache.*" |