Skip to content

Commit

Permalink
fix: add cache on master
Browse files Browse the repository at this point in the history
  • Loading branch information
conblem committed May 10, 2022
1 parent 733ca93 commit 31c11c2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/cache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Cache
on:
schedule:
- cron: '0 * * * *'
jobs:
cache:
runs-on: ubuntu-latest
steps:
- run: |
SIZE=$(PAGER=cat gh api -H "Accept: application/vnd.github.v3+json" /repos/$REPO/actions/cache/usage -q ".active_caches_size_in_bytes")
echo ::set-output name=SIZE::$(bc <<< "scale=4; $SIZE / 1000000000")
id: size
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
- uses: RubbaBoy/BYOB@v1.2.1
with:
NAME: Cache size
LABEL: 'Cache size'
STATUS: ${{ steps.size.outputs.SIZE }}
COLOR: 00EEFF
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 31c11c2

Please sign in to comment.