Skip to content

Cache

Cache #8460

Workflow file for this run

name: Cache
on:
workflow_dispatch:
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: size
LABEL: 'Cache size'
STATUS: ${{ steps.size.outputs.SIZE }} GB
COLOR: 00EEFF
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}