Skip to content

Commit 31c11c2

Browse files
committed
fix: add cache on master
1 parent 733ca93 commit 31c11c2

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/cache.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Cache
2+
on:
3+
schedule:
4+
- cron: '0 * * * *'
5+
jobs:
6+
cache:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- run: |
10+
SIZE=$(PAGER=cat gh api -H "Accept: application/vnd.github.v3+json" /repos/$REPO/actions/cache/usage -q ".active_caches_size_in_bytes")
11+
echo ::set-output name=SIZE::$(bc <<< "scale=4; $SIZE / 1000000000")
12+
id: size
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
REPO: ${{ github.repository }}
16+
- uses: RubbaBoy/[email protected]
17+
with:
18+
NAME: Cache size
19+
LABEL: 'Cache size'
20+
STATUS: ${{ steps.size.outputs.SIZE }}
21+
COLOR: 00EEFF
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)