mirror of
https://github.com/actions/cache.git
synced 2024-11-14 18:08:06 +00:00
Compare commits
42 Commits
7cd4aa68d3
...
44a7049ada
Author | SHA1 | Date | |
---|---|---|---|
|
44a7049ada | ||
|
2a844a33e9 | ||
|
fac953994b | ||
|
a98b273275 | ||
|
8d4d93acb2 | ||
|
fbd9b78e14 | ||
|
6849a64899 | ||
|
5a1720c49e | ||
|
d9fef48d24 | ||
|
a50e8d027b | ||
|
acc9ae5c14 | ||
|
1ea5f18c31 | ||
|
cc679ff3ba | ||
|
366d43d6f8 | ||
|
02bf31969b | ||
|
6f6220be5a | ||
|
ebdd24ede1 | ||
|
255c8ff306 | ||
|
010f24cd9d | ||
|
d6151ba7db | ||
|
4ca7071576 | ||
|
5d692d65f4 | ||
|
3aef79d3a3 | ||
|
aa55e5f344 | ||
|
772385291f | ||
|
e5dc90df92 | ||
|
8585f2ac5c | ||
|
9803087a86 | ||
|
03bcea1bac | ||
|
0075a7b15e | ||
|
cf539bd9ee | ||
|
0968f23612 | ||
|
d1f6bed957 | ||
|
e7e2547a88 | ||
|
71d826cc33 | ||
|
25942a73ac | ||
|
d73025053b | ||
|
0769f2e443 | ||
|
515d10b4fd | ||
|
669e7536d9 | ||
|
29dbbce762 | ||
|
ea5981db97 |
22
.github/dependabot.yml
vendored
Normal file
22
.github/dependabot.yml
vendored
Normal 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
|
2
.github/workflows/close-inactive-issues.yml
vendored
2
.github/workflows/close-inactive-issues.yml
vendored
@ -10,7 +10,7 @@ jobs:
|
|||||||
issues: write
|
issues: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@v3
|
- uses: actions/stale@v9
|
||||||
with:
|
with:
|
||||||
days-before-issue-stale: 200
|
days-before-issue-stale: 200
|
||||||
days-before-issue-close: 5
|
days-before-issue-close: 5
|
||||||
|
8
.github/workflows/codeql.yml
vendored
8
.github/workflows/codeql.yml
vendored
@ -17,11 +17,11 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- 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
|
# Override language selection by uncommenting this and choosing your languages
|
||||||
# with:
|
# with:
|
||||||
# languages: go, javascript, csharp, python, cpp, java, ruby
|
# 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).
|
# 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).
|
# If this step fails, then you should remove it and run the build manually (see below).
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v2
|
uses: github/codeql-action/autobuild@v3
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ 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
|
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||||
@ -43,4 +43,4 @@ jobs:
|
|||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v2
|
uses: github/codeql-action/analyze@v3
|
||||||
|
12
.github/workflows/workflow.yml
vendored
12
.github/workflows/workflow.yml
vendored
@ -20,9 +20,9 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Setup Node.js 20.x
|
- name: Setup Node.js 20.x
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20.x
|
node-version: 20.x
|
||||||
cache: npm
|
cache: npm
|
||||||
@ -43,7 +43,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Generate files in working directory
|
- name: Generate files in working directory
|
||||||
shell: bash
|
shell: bash
|
||||||
run: __tests__/create-cache-files.sh ${{ runner.os }} test-cache
|
run: __tests__/create-cache-files.sh ${{ runner.os }} test-cache
|
||||||
@ -66,7 +66,7 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
@ -96,7 +96,7 @@ jobs:
|
|||||||
https_proxy: http://squid-proxy:3128
|
https_proxy: http://squid-proxy:3128
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Generate files
|
- name: Generate files
|
||||||
run: __tests__/create-cache-files.sh proxy test-cache
|
run: __tests__/create-cache-files.sh proxy test-cache
|
||||||
- name: Save cache
|
- name: Save cache
|
||||||
@ -119,7 +119,7 @@ jobs:
|
|||||||
https_proxy: http://squid-proxy:3128
|
https_proxy: http://squid-proxy:3128
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Restore cache
|
- name: Restore cache
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
@ -1,9 +1,16 @@
|
|||||||
# Releases
|
# 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
|
### 4.1.1
|
||||||
|
|
||||||
- Restore original behavior of `cache-hit` output - [#1467](https://github.com/actions/cache/pull/1467)
|
- Restore original behavior of `cache-hit` output - [#1467](https://github.com/actions/cache/pull/1467)
|
||||||
|
|
||||||
### 4.1.0
|
### 4.1.0
|
||||||
|
|
||||||
- Ensure `cache-hit` output is set when a cache is missed - [#1404](https://github.com/actions/cache/pull/1404)
|
- 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)
|
- Deprecate `save-always` input - [#1452](https://github.com/actions/cache/pull/1452)
|
||||||
|
|
||||||
|
@ -8,17 +8,26 @@ import * as testUtils from "../src/utils/testUtils";
|
|||||||
jest.mock("@actions/core");
|
jest.mock("@actions/core");
|
||||||
jest.mock("@actions/cache");
|
jest.mock("@actions/cache");
|
||||||
|
|
||||||
|
let pristineEnv: NodeJS.ProcessEnv;
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
|
pristineEnv = process.env;
|
||||||
jest.spyOn(core, "getInput").mockImplementation((name, options) => {
|
jest.spyOn(core, "getInput").mockImplementation((name, options) => {
|
||||||
return jest.requireActual("@actions/core").getInput(name, options);
|
return jest.requireActual("@actions/core").getInput(name, options);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
beforeEach(() => {
|
||||||
|
jest.resetModules();
|
||||||
|
process.env = pristineEnv;
|
||||||
delete process.env[Events.Key];
|
delete process.env[Events.Key];
|
||||||
delete process.env[RefKey];
|
delete process.env[RefKey];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
afterAll(() => {
|
||||||
|
process.env = pristineEnv;
|
||||||
|
});
|
||||||
|
|
||||||
test("isGhes returns true if server url is not github.com", () => {
|
test("isGhes returns true if server url is not github.com", () => {
|
||||||
try {
|
try {
|
||||||
process.env["GITHUB_SERVER_URL"] = "http://example.com";
|
process.env["GITHUB_SERVER_URL"] = "http://example.com";
|
||||||
@ -231,3 +240,28 @@ test("isCacheFeatureAvailable for ac disabled on dotcom", () => {
|
|||||||
delete process.env["GITHUB_SERVER_URL"];
|
delete process.env["GITHUB_SERVER_URL"];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("isGhes returns false when the GITHUB_SERVER_URL environment variable is not defined", async () => {
|
||||||
|
delete process.env["GITHUB_SERVER_URL"];
|
||||||
|
expect(actionUtils.isGhes()).toBeFalsy();
|
||||||
|
});
|
||||||
|
|
||||||
|
test("isGhes returns false when the GITHUB_SERVER_URL environment variable is set to github.com", async () => {
|
||||||
|
process.env["GITHUB_SERVER_URL"] = "https://github.com";
|
||||||
|
expect(actionUtils.isGhes()).toBeFalsy();
|
||||||
|
});
|
||||||
|
|
||||||
|
test("isGhes returns false when the GITHUB_SERVER_URL environment variable is set to a GitHub Enterprise Cloud-style URL", async () => {
|
||||||
|
process.env["GITHUB_SERVER_URL"] = "https://contoso.ghe.com";
|
||||||
|
expect(actionUtils.isGhes()).toBeFalsy();
|
||||||
|
});
|
||||||
|
|
||||||
|
test("isGhes returns false when the GITHUB_SERVER_URL environment variable has a .localhost suffix", async () => {
|
||||||
|
process.env["GITHUB_SERVER_URL"] = "https://mock-github.localhost";
|
||||||
|
expect(actionUtils.isGhes()).toBeFalsy();
|
||||||
|
});
|
||||||
|
|
||||||
|
test("isGhes returns true when the GITHUB_SERVER_URL environment variable is set to some other URL", async () => {
|
||||||
|
process.env["GITHUB_SERVER_URL"] = "https://src.onpremise.fabrikam.com";
|
||||||
|
expect(actionUtils.isGhes()).toBeTruthy();
|
||||||
|
});
|
||||||
|
52662
dist/restore-only/index.js
vendored
52662
dist/restore-only/index.js
vendored
File diff suppressed because one or more lines are too long
52662
dist/restore/index.js
vendored
52662
dist/restore/index.js
vendored
File diff suppressed because one or more lines are too long
52662
dist/save-only/index.js
vendored
52662
dist/save-only/index.js
vendored
File diff suppressed because one or more lines are too long
52662
dist/save/index.js
vendored
52662
dist/save/index.js
vendored
File diff suppressed because one or more lines are too long
80
package-lock.json
generated
80
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "cache",
|
"name": "cache",
|
||||||
"version": "4.1.1",
|
"version": "4.1.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cache",
|
"name": "cache",
|
||||||
"version": "4.1.1",
|
"version": "4.1.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "file:/workspaces/toolkit/packages/cache",
|
"@actions/cache": "file:/workspaces/toolkit/packages/cache",
|
||||||
@ -49,27 +49,23 @@
|
|||||||
"@azure/abort-controller": "^1.1.0",
|
"@azure/abort-controller": "^1.1.0",
|
||||||
"@azure/ms-rest-js": "^2.6.0",
|
"@azure/ms-rest-js": "^2.6.0",
|
||||||
"@azure/storage-blob": "^12.13.0",
|
"@azure/storage-blob": "^12.13.0",
|
||||||
"semver": "^6.3.1",
|
"semver": "^6.3.1"
|
||||||
"uuid": "^3.3.3"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/semver": "^6.0.0",
|
"@types/semver": "^6.0.0",
|
||||||
"@types/uuid": "^3.4.5",
|
|
||||||
"typescript": "^5.2.2"
|
"typescript": "^5.2.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"../toolkit/packages/core": {
|
"../toolkit/packages/core": {
|
||||||
"name": "@actions/core",
|
"name": "@actions/core",
|
||||||
"version": "1.10.1",
|
"version": "1.11.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
"@actions/http-client": "^2.0.1",
|
"@actions/http-client": "^2.0.1"
|
||||||
"uuid": "^8.3.2"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^12.0.2",
|
"@types/node": "^16.18.112"
|
||||||
"@types/uuid": "^8.3.4"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"../toolkit/packages/exec": {
|
"../toolkit/packages/exec": {
|
||||||
@ -3259,12 +3255,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/braces": {
|
"node_modules/braces": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
||||||
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fill-range": "^7.0.1"
|
"fill-range": "^7.1.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
@ -4326,9 +4322,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/fill-range": {
|
"node_modules/fill-range": {
|
||||||
"version": "7.0.1",
|
"version": "7.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
||||||
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"to-regex-range": "^5.0.1"
|
"to-regex-range": "^5.0.1"
|
||||||
@ -7843,6 +7839,16 @@
|
|||||||
"node": "*"
|
"node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/minimist": {
|
||||||
|
"version": "1.2.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
||||||
|
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/ms": {
|
"node_modules/ms": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||||
@ -8859,12 +8865,6 @@
|
|||||||
"json5": "lib/cli.js"
|
"json5": "lib/cli.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tsconfig-paths/node_modules/minimist": {
|
|
||||||
"version": "1.2.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
|
|
||||||
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"node_modules/tslib": {
|
"node_modules/tslib": {
|
||||||
"version": "1.14.1",
|
"version": "1.14.1",
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
||||||
@ -9132,10 +9132,8 @@
|
|||||||
"@azure/ms-rest-js": "^2.6.0",
|
"@azure/ms-rest-js": "^2.6.0",
|
||||||
"@azure/storage-blob": "^12.13.0",
|
"@azure/storage-blob": "^12.13.0",
|
||||||
"@types/semver": "^6.0.0",
|
"@types/semver": "^6.0.0",
|
||||||
"@types/uuid": "^3.4.5",
|
|
||||||
"semver": "^6.3.1",
|
"semver": "^6.3.1",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.2.2"
|
||||||
"uuid": "^3.3.3"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@actions/core": {
|
"@actions/core": {
|
||||||
@ -9143,9 +9141,7 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
"@actions/http-client": "^2.0.1",
|
"@actions/http-client": "^2.0.1",
|
||||||
"@types/node": "^12.0.2",
|
"@types/node": "^16.18.112"
|
||||||
"@types/uuid": "^8.3.4",
|
|
||||||
"uuid": "^8.3.2"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@actions/exec": {
|
"@actions/exec": {
|
||||||
@ -11623,12 +11619,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"braces": {
|
"braces": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
||||||
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"fill-range": "^7.0.1"
|
"fill-range": "^7.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
@ -12426,9 +12422,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fill-range": {
|
"fill-range": {
|
||||||
"version": "7.0.1",
|
"version": "7.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
||||||
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"to-regex-range": "^5.0.1"
|
"to-regex-range": "^5.0.1"
|
||||||
@ -15170,6 +15166,12 @@
|
|||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"minimist": {
|
||||||
|
"version": "1.2.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
||||||
|
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||||
@ -15887,12 +15889,6 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "^1.2.0"
|
"minimist": "^1.2.0"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"minimist": {
|
|
||||||
"version": "1.2.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
|
|
||||||
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
|
|
||||||
"dev": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cache",
|
"name": "cache",
|
||||||
"version": "4.1.1",
|
"version": "4.1.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Cache dependencies and build outputs",
|
"description": "Cache dependencies and build outputs",
|
||||||
"main": "dist/restore/index.js",
|
"main": "dist/restore/index.js",
|
||||||
|
@ -7,7 +7,13 @@ export function isGhes(): boolean {
|
|||||||
const ghUrl = new URL(
|
const ghUrl = new URL(
|
||||||
process.env["GITHUB_SERVER_URL"] || "https://github.com"
|
process.env["GITHUB_SERVER_URL"] || "https://github.com"
|
||||||
);
|
);
|
||||||
return ghUrl.hostname.toUpperCase() !== "GITHUB.COM";
|
|
||||||
|
const hostname = ghUrl.hostname.trimEnd().toUpperCase();
|
||||||
|
const isGitHubHost = hostname === "GITHUB.COM";
|
||||||
|
const isGitHubEnterpriseCloudHost = hostname.endsWith(".GHE.COM");
|
||||||
|
const isLocalHost = hostname.endsWith(".LOCALHOST");
|
||||||
|
|
||||||
|
return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isExactKeyMatch(key: string, cacheKey?: string): boolean {
|
export function isExactKeyMatch(key: string, cacheKey?: string): boolean {
|
||||||
|
Loading…
Reference in New Issue
Block a user