From be131183c616969e05edcaacedbb50a48891bf12 Mon Sep 17 00:00:00 2001 From: Dany Sam Date: Fri, 11 Apr 2025 13:01:48 +0530 Subject: [PATCH] Update README with a quick setup guide --- README.md | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7892c30..7ca4654 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,25 @@ This fork of the GitHub Actions cache action adds Google Cloud Storage (GCS) as - **Custom retention**: Control cache retention policies through GCS lifecycle management - **Existing infrastructure**: Leverage your existing GCS infrastructure and permissions -[![Tests](https://github.com/danySam/gcs-cache/actions/workflows/workflow.yml/badge.svg)](https://github.com/danySam/gcs-cache/actions/workflows/workflow.yml) +## Quick Setup Guide ->Three actions are available: ->* Primary `cache` action with automatic save/restore ->* [Restore action](./restore/README.md) for restore-only operation ->* [Save action](./save/README.md) for save-only operation +1. **Create a GCS bucket** for your caches (if you don't already have one) +2. **Set up authentication**: + ```yaml + - uses: google-github-actions/auth@v2 + with: + credentials_json: ${{ secrets.GCP_CREDENTIALS }} + ``` +3. **Add to your workflow**: + ```yaml + - uses: danySam/gcs-cache@v1 + with: + path: ~/.npm + key: npm-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} + gcs-bucket: your-gcs-bucket-name + ``` + +That's it! Your cache will now use GCS storage with automatic fallback to GitHub's cache. ## Documentation