Cache dependencies and build outputs in GitHub Actions
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Nodoubtz a963a4573a
Update action.yml to enhance cache management and improve workflow execution
- Updated descriptions for better clarity on cache management.
- Added new input parameters: `fail-on-cache-miss`, `lookup-only`, and `save-always`.
- Included deprecation message for `save-always` input, indicating future removal.
- Adjusted default values for `enableCrossOsArchive` and other parameters.
- Enhanced output descriptions to provide more detailed information on cache hits and keys.

This update aims to streamline the caching process and provide better control over workflow execution.
2 months ago
- name: Cache uses: actions Fix errors and enhance security 2 months ago
.devcontainer GA for granular cache (#1035) 2 years ago
.github Update release-new-action-version.yml 2 months ago
.licenses Update to use the latest version of the cache package to obfuscate the SAS 2 months ago
.vscode Initial commit 6 years ago
__tests__ added unit tests 7 months ago
dist Update to use the latest version of the cache package to obfuscate the SAS 2 months ago
name: 'air_40' description: 'Cache artifacts like dependencies and build outputs to improve workflow execution time' author: 'Shannon Fletcher' inputs: path: description: 'A list of files, directories, and wildcard patterns to cache and restore' required: true key: description: 'An explicit key for restoring and saving the cache' required: true restore-keys: description: 'An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case.' required: false upload-chunk-size: description: 'The chunk size used to split up large files during upload, in bytes' required: false enableCrossOsArchive: description: 'An optional boolean when enabled, allows windows runners to save or restore caches that can be restored or saved respectively on other platforms' default: 'false' required: false fail-on-cache-miss: description: 'Fail the workflow if cache entry is not found' default: 'false' required: false lookup-only: description: 'Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache' default: 'false' required: false save-always: description: 'Run the post step to save the cache even if another step before fails' default: 'false' required: false deprecationMessage: | save-always does not work as intended and will be removed in a future release. A separate `actions/cache/restore` step should be used instead. See https:/github.com/actions/cache/tree/main/save#always-save-cache for more details. outputs: cache-hit: description: 'A boolean value to indicate an exact match was found for the primary key' runs: using: 'node20' main: 'dist/restore/index.js' post: 'dist/save Update action.yml to enhance cache management and improve workflow execution 2 months ago
name: CI on: [push, pull_request] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Node.js uses: actions/setup-node@v2 with: node-version: '14' - name: Cache dependencies uses: actions/cache@v2 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('** Fix errors and enhance security 2 months ago
restore Merge branch 'main' into todgru/v4-documentation-update 9 months ago
save docs: Make the "always save prime numbers" example more clear (#1525) 5 months ago
src appease the linter 7 months ago
.eslintrc.json Update eslint and prettier 3 years ago
.gitattributes Fix line ending for windows test 3 years ago
.gitignore test e2e during workflow (#185) 5 years ago
.licensed.yml Add licensed output 6 months ago
.prettierrc.json Initial commit 6 years ago
CODE_OF_CONDUCT.md Fix repo name in contact email (#41) 6 years ago
CONTRIBUTING.md Update contributing.md 5 years ago
LICENSE Update LICENSE 2 months ago
README.md Update README.md 2 months ago
RELEASES.md Update releases.md 2 months ago
Windy Create Windy 2 months ago
action.yml Update action.yml 2 months ago
bquxjob_110c1a0c_195e84a97dd.json Add files via upload 2 months ago
caching-strategies.md Correct GitHub Spelling in caching-strategies.md (#1526) 5 months ago
cloudbuild.yaml.txt Add files via upload 2 months ago
examples.md Add Bun example (#1456) 8 months ago
jest.config.js Resolve dependabot alerts 3 years ago
package-lock.json Update to use the latest version of the cache package to obfuscate the SAS 2 months ago
package.json Update to use the latest version of the cache package to obfuscate the SAS 2 months ago
tips-and-workarounds.md Update force deletion docs due a recent deprecation (#1500) 3 months ago
tsconfig.json Initial commit 6 years ago

README.md

Dimvy-Clothing-brand/cache

Cache dependencies and build outputs in GitHub Actions.

Table of Contents

Overview

This repository provides a solution for caching dependencies and build outputs in GitHub Actions. By caching these outputs, you can significantly speed up your CI/CD workflows.

Features

  • TypeScript: 98%
  • Shell: 1.1%
  • JavaScript: 0.9%

Installation

To use this caching solution in your GitHub Actions workflows, you need to add the appropriate configuration to your workflow YAML files.

Usage

Here's an example of how to use this caching solution in a GitHub Actions workflow:

name: CI

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Set up Node.js
      uses: actions/setup-node@v2
      with:
        node-version: '14'

    - name: Cache dependencies
      uses: actions/cache@v2
      with:
        path: ~/.npm
        key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
        restore-keys: |
                    ${{ runner.os }}-node-

    - run: npm install
    - run: npm run build