Skip to content

[Purge Cache] 请求立即更新缓存 #968

[Purge Cache] 请求立即更新缓存

[Purge Cache] 请求立即更新缓存 #968

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.*"