Compare commits

...

23 Commits

Author SHA1 Message Date
Mustafacco e5a0015830
Merge fa6c089775 into 6849a64899 2024-10-24 10:49:57 +02:00
Bassem Dghaidi 6849a64899
Release 4.1.2 #1477
Prepare `4.1.2` release
2024-10-22 14:33:17 +02:00
Bassem Dghaidi 5a1720c49e Merge branch 'Link-/prep-4.1.2' of https://github.com/actions/cache into Link-/prep-4.1.2 2024-10-22 04:25:33 -07:00
Bassem Dghaidi d9fef48d24
Merge branch 'main' into Link-/prep-4.1.2 2024-10-22 13:25:20 +02:00
Bassem Dghaidi a50e8d027b Merge branch 'main' into Link-/prep-4.1.2 2024-10-22 04:24:43 -07:00
Bassem Dghaidi acc9ae5c14
Merge pull request #1481 from actions/dependabot/github_actions/actions/setup-node-4
Bump actions/setup-node from 3 to 4
2024-10-22 13:19:36 +02:00
Bassem Dghaidi 1ea5f18c31
Merge branch 'main' into Link-/prep-4.1.2 2024-10-22 13:17:46 +02:00
Bassem Dghaidi cc679ff3ba
Merge branch 'main' into dependabot/github_actions/actions/setup-node-4 2024-10-22 13:16:44 +02:00
Bassem Dghaidi 366d43d6f8
Merge pull request #1483 from actions/dependabot/github_actions/github/codeql-action-3
Bump github/codeql-action from 2 to 3
2024-10-22 13:16:34 +02:00
dependabot[bot] 02bf31969b
Bump github/codeql-action from 2 to 3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-22 11:14:30 +00:00
Bassem Dghaidi 6f6220be5a
Merge branch 'main' into dependabot/github_actions/actions/setup-node-4 2024-10-22 13:14:22 +02:00
Bassem Dghaidi ebdd24ede1
Merge pull request #1479 from actions/dependabot/github_actions/actions/stale-9
Bump actions/stale from 3 to 9
2024-10-22 13:13:31 +02:00
dependabot[bot] 255c8ff306
Bump actions/setup-node from 3 to 4
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-22 11:12:37 +00:00
Bassem Dghaidi 010f24cd9d
Merge branch 'main' into dependabot/github_actions/actions/stale-9 2024-10-22 13:12:09 +02:00
Bassem Dghaidi d6151ba7db
Merge pull request #1478 from actions/dependabot/github_actions/actions/checkout-4
Bump actions/checkout from 3 to 4
2024-10-22 13:11:35 +02:00
dependabot[bot] 4ca7071576
Bump actions/stale from 3 to 9
Bumps [actions/stale](https://github.com/actions/stale) from 3 to 9.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v3...v9)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-22 11:04:21 +00:00
dependabot[bot] 5d692d65f4
Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-22 11:04:20 +00:00
Bassem Dghaidi 3aef79d3a3
Enable dependabot updates
Add dependabot.yml to enable automatic dependency upgrades
2024-10-22 13:03:26 +02:00
Bassem Dghaidi aa55e5f344 Prepare release 4.1.2 2024-10-22 03:54:14 -07:00
Bassem Dghaidi 772385291f
Create dependabot.yml 2024-10-22 12:34:45 +02:00
Bassem Dghaidi e5dc90df92
Merge pull request #1475 from actions/dependabot/npm_and_yarn/braces-3.0.3
Bump braces from 3.0.2 to 3.0.3
2024-10-22 11:59:13 +02:00
dependabot[bot] 8585f2ac5c
Bump braces from 3.0.2 to 3.0.3
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-22 09:52:18 +00:00
Mustafacco fa6c089775 Add main functionalities section to README and action.yml
Add a new section "Main functionalities" to describe the main functionalities provided by the `cache` action.

* **README.md**:
  - Add a new section "Main functionalities" to describe the main functionalities provided by the `cache` action.
  - Include details about caching dependencies and build outputs, restoring cache, saving cache, cross-OS caching, failing on cache miss, and lookup-only mode.

* **action.yml**:
  - Add a new section "main functionalities" to describe the main functionalities provided by the `cache` action.
  - Include details about caching dependencies and build outputs, restoring cache, saving cache, cross-OS caching, failing on cache miss, and lookup-only mode.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/actions/cache?shareId=XXXX-XXXX-XXXX-XXXX).
2024-10-18 04:26:18 +03:00
9 changed files with 77 additions and 27 deletions

22
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,22 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
minor-actions-dependencies:
update-types: [minor, patch]
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
allow:
- dependency-type: direct
- dependency-type: production

View File

@ -10,7 +10,7 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v3
- uses: actions/stale@v9
with:
days-before-issue-stale: 200
days-before-issue-close: 5

View File

@ -17,11 +17,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java, ruby
@ -29,7 +29,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below).
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@ -43,4 +43,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3

View File

@ -20,9 +20,9 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
@ -43,7 +43,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Generate files in working directory
shell: bash
run: __tests__/create-cache-files.sh ${{ runner.os }} test-cache
@ -66,7 +66,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Restore cache
uses: ./
with:
@ -96,7 +96,7 @@ jobs:
https_proxy: http://squid-proxy:3128
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Generate files
run: __tests__/create-cache-files.sh proxy test-cache
- name: Save cache
@ -119,7 +119,7 @@ jobs:
https_proxy: http://squid-proxy:3128
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Restore cache
uses: ./
with:

View File

@ -316,6 +316,17 @@ There are a number of community practices/workarounds to fulfill specific requir
Please note that Windows environment variables (like `%LocalAppData%`) will NOT be expanded by this action. Instead, prefer using `~` in your paths which will expand to the HOME directory. For example, instead of `%LocalAppData%`, use `~\AppData\Local`. For a list of supported default environment variables, see the [Learn GitHub Actions: Variables](https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables) page.
## Main functionalities
The `cache` action in this repository provides several main functionalities:
* **Caching dependencies and build outputs**: The primary function of the `cache` action is to cache dependencies and build outputs to improve workflow execution time. This is specified in the `description` field of the `action.yml` file (`action.yml`). 🗃️
* **Restoring cache**: The `cache` action can restore cached files, directories, and wildcard patterns specified in the `path` input. This is done using the `restoreCache` function from the `@actions/cache` package (`src/restoreImpl.ts`). 🔄
* **Saving cache**: The `cache` action can save files, directories, and wildcard patterns specified in the `path` input to the cache. This is done using the `saveCache` function from the `@actions/cache` package (`src/saveImpl.ts`). 💾
* **Cross-OS caching**: The `cache` action supports cross-OS caching, allowing Windows runners to save or restore caches that can be restored or saved respectively on other platforms. This is controlled by the `enableCrossOsArchive` input (`action.yml`). 🌐
* **Failing on cache miss**: The `cache` action can be configured to fail the workflow if a cache entry is not found. This is controlled by the `fail-on-cache-miss` input (`action.yml`). ❌
* **Lookup-only mode**: The `cache` action can check if a cache entry exists for the given inputs without downloading the cache. This is controlled by the `lookup-only` input (`action.yml`). 🔍
## Contributing
We would love for you to contribute to `actions/cache`. Pull requests are welcome! Please see the [CONTRIBUTING.md](CONTRIBUTING.md) for more information.

View File

@ -1,9 +1,16 @@
# Releases
### 4.1.2
- Add GitHub Enterprise Cloud instances hostname filters to inform API endpoint choices - [#1474](https://github.com/actions/cache/pull/1474)
- Security fix: Bump braces from 3.0.2 to 3.0.3 - [#1475](https://github.com/actions/cache/pull/1475)
### 4.1.1
- Restore original behavior of `cache-hit` output - [#1467](https://github.com/actions/cache/pull/1467)
### 4.1.0
- Ensure `cache-hit` output is set when a cache is missed - [#1404](https://github.com/actions/cache/pull/1404)
- Deprecate `save-always` input - [#1452](https://github.com/actions/cache/pull/1452)

View File

@ -45,3 +45,13 @@ runs:
branding:
icon: 'archive'
color: 'gray-dark'
main functionalities:
description: 'The main functionalities provided by the `cache` action are:'
details:
- 'Caching dependencies and build outputs: The primary function of the `cache` action is to cache dependencies and build outputs to improve workflow execution time. This is specified in the `description` field of the `action.yml` file (`action.yml`). 🗃️'
- 'Restoring cache: The `cache` action can restore cached files, directories, and wildcard patterns specified in the `path` input. This is done using the `restoreCache` function from the `@actions/cache` package (`src/restoreImpl.ts`). 🔄'
- 'Saving cache: The `cache` action can save files, directories, and wildcard patterns specified in the `path` input to the cache. This is done using the `saveCache` function from the `@actions/cache` package (`src/saveImpl.ts`). 💾'
- 'Cross-OS caching: The `cache` action supports cross-OS caching, allowing Windows runners to save or restore caches that can be restored or saved respectively on other platforms. This is controlled by the `enableCrossOsArchive` input (`action.yml`). 🌐'
- 'Failing on cache miss: The `cache` action can be configured to fail the workflow if a cache entry is not found. This is controlled by the `fail-on-cache-miss` input (`action.yml`). ❌'
- 'Lookup-only mode: The `cache` action can check if a cache entry exists for the given inputs without downloading the cache. This is controlled by the `lookup-only` input (`action.yml`). 🔍'

28
package-lock.json generated
View File

@ -3521,12 +3521,12 @@
}
},
"node_modules/braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
"dependencies": {
"fill-range": "^7.0.1"
"fill-range": "^7.1.1"
},
"engines": {
"node": ">=8"
@ -4622,9 +4622,9 @@
}
},
"node_modules/fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
"dependencies": {
"to-regex-range": "^5.0.1"
@ -12302,12 +12302,12 @@
}
},
"braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
"requires": {
"fill-range": "^7.0.1"
"fill-range": "^7.1.1"
}
},
"browserslist": {
@ -13127,9 +13127,9 @@
}
},
"fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
"requires": {
"to-regex-range": "^5.0.1"

View File

@ -1,6 +1,6 @@
{
"name": "cache",
"version": "4.1.1",
"version": "4.1.2",
"private": true,
"description": "Cache dependencies and build outputs",
"main": "dist/restore/index.js",