mirror of
https://github.com/docker/build-push-action.git
synced 2026-04-25 13:10:27 +08:00
Compare commits
6 Commits
dependabot
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21f7630a74 | ||
|
|
d70693f4ae | ||
|
|
e0fea16cbf | ||
|
|
f832d4c773 | ||
|
|
17a24e14ed | ||
|
|
ad938becb9 |
6
.github/workflows/codeql.yml
vendored
6
.github/workflows/codeql.yml
vendored
@@ -30,17 +30,17 @@ jobs:
|
|||||||
yarn --version
|
yarn --version
|
||||||
-
|
-
|
||||||
name: Set up Node
|
name: Set up Node
|
||||||
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ env.NODE_VERSION }}
|
node-version: ${{ env.NODE_VERSION }}
|
||||||
-
|
-
|
||||||
name: Initialize CodeQL
|
name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
|
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
|
||||||
with:
|
with:
|
||||||
languages: javascript-typescript
|
languages: javascript-typescript
|
||||||
build-mode: none
|
build-mode: none
|
||||||
-
|
-
|
||||||
name: Perform CodeQL Analysis
|
name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
|
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
|
||||||
with:
|
with:
|
||||||
category: "/language:javascript-typescript"
|
category: "/language:javascript-typescript"
|
||||||
|
|||||||
2
.github/workflows/pr-assign-author.yml
vendored
2
.github/workflows/pr-assign-author.yml
vendored
@@ -11,7 +11,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: crazy-max/.github/.github/workflows/pr-assign-author.yml@d89fe92d808a15e2b2ed5cdb62db7c172c31410d # v1.6.0
|
uses: crazy-max/.github/.github/workflows/pr-assign-author.yml@4a17dbaa9ce13920fc5bb8824eb89c16301e5ab2 # v1.7.0
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|||||||
2
.github/workflows/zizmor.yml
vendored
2
.github/workflows/zizmor.yml
vendored
@@ -19,7 +19,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
zizmor:
|
zizmor:
|
||||||
uses: crazy-max/.github/.github/workflows/zizmor.yml@d89fe92d808a15e2b2ed5cdb62db7c172c31410d # v1.6.0
|
uses: crazy-max/.github/.github/workflows/zizmor.yml@4a17dbaa9ce13920fc5bb8824eb89c16301e5ab2 # v1.7.0
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
security-events: write
|
security-events: write
|
||||||
|
|||||||
@@ -122,5 +122,5 @@ outputs:
|
|||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'node24'
|
using: 'node24'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.cjs'
|
||||||
post: 'dist/index.js'
|
post: 'dist/index.cjs'
|
||||||
|
|||||||
301
dist/606.index.js
generated
vendored
301
dist/606.index.js
generated
vendored
@@ -1,301 +0,0 @@
|
|||||||
export const id = 606;
|
|
||||||
export const ids = [606];
|
|
||||||
export const modules = {
|
|
||||||
|
|
||||||
/***/ 606:
|
|
||||||
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "default": () => (/* binding */ pMap)
|
|
||||||
/* harmony export */ });
|
|
||||||
/* unused harmony exports pMapIterable, pMapSkip */
|
|
||||||
async function pMap(
|
|
||||||
iterable,
|
|
||||||
mapper,
|
|
||||||
{
|
|
||||||
concurrency = Number.POSITIVE_INFINITY,
|
|
||||||
stopOnError = true,
|
|
||||||
signal,
|
|
||||||
} = {},
|
|
||||||
) {
|
|
||||||
return new Promise((resolve_, reject_) => {
|
|
||||||
if (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) {
|
|
||||||
throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof mapper !== 'function') {
|
|
||||||
throw new TypeError('Mapper function is required');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!((Number.isSafeInteger(concurrency) && concurrency >= 1) || concurrency === Number.POSITIVE_INFINITY)) {
|
|
||||||
throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const result = [];
|
|
||||||
const errors = [];
|
|
||||||
const skippedIndexesMap = new Map();
|
|
||||||
let isRejected = false;
|
|
||||||
let isResolved = false;
|
|
||||||
let isIterableDone = false;
|
|
||||||
let resolvingCount = 0;
|
|
||||||
let currentIndex = 0;
|
|
||||||
const iterator = iterable[Symbol.iterator] === undefined ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();
|
|
||||||
|
|
||||||
const signalListener = () => {
|
|
||||||
reject(signal.reason);
|
|
||||||
};
|
|
||||||
|
|
||||||
const cleanup = () => {
|
|
||||||
signal?.removeEventListener('abort', signalListener);
|
|
||||||
};
|
|
||||||
|
|
||||||
const resolve = value => {
|
|
||||||
resolve_(value);
|
|
||||||
cleanup();
|
|
||||||
};
|
|
||||||
|
|
||||||
const reject = reason => {
|
|
||||||
isRejected = true;
|
|
||||||
isResolved = true;
|
|
||||||
reject_(reason);
|
|
||||||
cleanup();
|
|
||||||
};
|
|
||||||
|
|
||||||
if (signal) {
|
|
||||||
if (signal.aborted) {
|
|
||||||
reject(signal.reason);
|
|
||||||
}
|
|
||||||
|
|
||||||
signal.addEventListener('abort', signalListener, {once: true});
|
|
||||||
}
|
|
||||||
|
|
||||||
const next = async () => {
|
|
||||||
if (isResolved) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const nextItem = await iterator.next();
|
|
||||||
|
|
||||||
const index = currentIndex;
|
|
||||||
currentIndex++;
|
|
||||||
|
|
||||||
// Note: `iterator.next()` can be called many times in parallel.
|
|
||||||
// This can cause multiple calls to this `next()` function to
|
|
||||||
// receive a `nextItem` with `done === true`.
|
|
||||||
// The shutdown logic that rejects/resolves must be protected
|
|
||||||
// so it runs only one time as the `skippedIndex` logic is
|
|
||||||
// non-idempotent.
|
|
||||||
if (nextItem.done) {
|
|
||||||
isIterableDone = true;
|
|
||||||
|
|
||||||
if (resolvingCount === 0 && !isResolved) {
|
|
||||||
if (!stopOnError && errors.length > 0) {
|
|
||||||
reject(new AggregateError(errors)); // eslint-disable-line unicorn/error-message
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
isResolved = true;
|
|
||||||
|
|
||||||
if (skippedIndexesMap.size === 0) {
|
|
||||||
resolve(result);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const pureResult = [];
|
|
||||||
|
|
||||||
// Support multiple `pMapSkip`'s.
|
|
||||||
for (const [index, value] of result.entries()) {
|
|
||||||
if (skippedIndexesMap.get(index) === pMapSkip) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
pureResult.push(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
resolve(pureResult);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
resolvingCount++;
|
|
||||||
|
|
||||||
// Intentionally detached
|
|
||||||
(async () => {
|
|
||||||
try {
|
|
||||||
const element = await nextItem.value;
|
|
||||||
|
|
||||||
if (isResolved) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const value = await mapper(element, index);
|
|
||||||
|
|
||||||
// Use Map to stage the index of the element.
|
|
||||||
if (value === pMapSkip) {
|
|
||||||
skippedIndexesMap.set(index, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
result[index] = value;
|
|
||||||
|
|
||||||
resolvingCount--;
|
|
||||||
await next();
|
|
||||||
} catch (error) {
|
|
||||||
if (stopOnError) {
|
|
||||||
reject(error);
|
|
||||||
} else {
|
|
||||||
errors.push(error);
|
|
||||||
resolvingCount--;
|
|
||||||
|
|
||||||
// In that case we can't really continue regardless of `stopOnError` state
|
|
||||||
// since an iterable is likely to continue throwing after it throws once.
|
|
||||||
// If we continue calling `next()` indefinitely we will likely end up
|
|
||||||
// in an infinite loop of failed iteration.
|
|
||||||
try {
|
|
||||||
await next();
|
|
||||||
} catch (error) {
|
|
||||||
reject(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
};
|
|
||||||
|
|
||||||
// Create the concurrent runners in a detached (non-awaited)
|
|
||||||
// promise. We need this so we can await the `next()` calls
|
|
||||||
// to stop creating runners before hitting the concurrency limit
|
|
||||||
// if the iterable has already been marked as done.
|
|
||||||
// NOTE: We *must* do this for async iterators otherwise we'll spin up
|
|
||||||
// infinite `next()` calls by default and never start the event loop.
|
|
||||||
(async () => {
|
|
||||||
for (let index = 0; index < concurrency; index++) {
|
|
||||||
try {
|
|
||||||
// eslint-disable-next-line no-await-in-loop
|
|
||||||
await next();
|
|
||||||
} catch (error) {
|
|
||||||
reject(error);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isIterableDone || isRejected) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function pMapIterable(
|
|
||||||
iterable,
|
|
||||||
mapper,
|
|
||||||
{
|
|
||||||
concurrency = Number.POSITIVE_INFINITY,
|
|
||||||
backpressure = concurrency,
|
|
||||||
} = {},
|
|
||||||
) {
|
|
||||||
if (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) {
|
|
||||||
throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof mapper !== 'function') {
|
|
||||||
throw new TypeError('Mapper function is required');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!((Number.isSafeInteger(concurrency) && concurrency >= 1) || concurrency === Number.POSITIVE_INFINITY)) {
|
|
||||||
throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!((Number.isSafeInteger(backpressure) && backpressure >= concurrency) || backpressure === Number.POSITIVE_INFINITY)) {
|
|
||||||
throw new TypeError(`Expected \`backpressure\` to be an integer from \`concurrency\` (${concurrency}) and up or \`Infinity\`, got \`${backpressure}\` (${typeof backpressure})`);
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
async * [Symbol.asyncIterator]() {
|
|
||||||
const iterator = iterable[Symbol.asyncIterator] === undefined ? iterable[Symbol.iterator]() : iterable[Symbol.asyncIterator]();
|
|
||||||
|
|
||||||
const promises = [];
|
|
||||||
let pendingPromisesCount = 0;
|
|
||||||
let isDone = false;
|
|
||||||
let index = 0;
|
|
||||||
|
|
||||||
function trySpawn() {
|
|
||||||
if (isDone || !(pendingPromisesCount < concurrency && promises.length < backpressure)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
pendingPromisesCount++;
|
|
||||||
|
|
||||||
const promise = (async () => {
|
|
||||||
const {done, value} = await iterator.next();
|
|
||||||
|
|
||||||
if (done) {
|
|
||||||
pendingPromisesCount--;
|
|
||||||
return {done: true};
|
|
||||||
}
|
|
||||||
|
|
||||||
// Spawn if still below concurrency and backpressure limit
|
|
||||||
trySpawn();
|
|
||||||
|
|
||||||
try {
|
|
||||||
const returnValue = await mapper(await value, index++);
|
|
||||||
|
|
||||||
pendingPromisesCount--;
|
|
||||||
|
|
||||||
if (returnValue === pMapSkip) {
|
|
||||||
const index = promises.indexOf(promise);
|
|
||||||
|
|
||||||
if (index > 0) {
|
|
||||||
promises.splice(index, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Spawn if still below backpressure limit and just dropped below concurrency limit
|
|
||||||
trySpawn();
|
|
||||||
|
|
||||||
return {done: false, value: returnValue};
|
|
||||||
} catch (error) {
|
|
||||||
pendingPromisesCount--;
|
|
||||||
isDone = true;
|
|
||||||
return {error};
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
|
|
||||||
promises.push(promise);
|
|
||||||
}
|
|
||||||
|
|
||||||
trySpawn();
|
|
||||||
|
|
||||||
while (promises.length > 0) {
|
|
||||||
const {error, done, value} = await promises[0]; // eslint-disable-line no-await-in-loop
|
|
||||||
|
|
||||||
promises.shift();
|
|
||||||
|
|
||||||
if (error) {
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (done) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Spawn if just dropped below backpressure limit and below the concurrency limit
|
|
||||||
trySpawn();
|
|
||||||
|
|
||||||
if (value === pMapSkip) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
yield value;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const pMapSkip = Symbol('skip');
|
|
||||||
|
|
||||||
|
|
||||||
/***/ })
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
//# sourceMappingURL=606.index.js.map
|
|
||||||
1
dist/606.index.js.map
generated
vendored
1
dist/606.index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
443
dist/index.cjs
generated
vendored
Normal file
443
dist/index.cjs
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
8
dist/index.js.map → dist/index.cjs.map
generated
vendored
8
dist/index.js.map → dist/index.cjs.map
generated
vendored
File diff suppressed because one or more lines are too long
136
dist/index.js
generated
vendored
136
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
5431
dist/licenses.txt
generated
vendored
5431
dist/licenses.txt
generated
vendored
File diff suppressed because it is too large
Load Diff
3
dist/package.json
generated
vendored
3
dist/package.json
generated
vendored
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"type": "module"
|
|
||||||
}
|
|
||||||
1
dist/sourcemap-register.cjs
generated
vendored
1
dist/sourcemap-register.cjs
generated
vendored
File diff suppressed because one or more lines are too long
@@ -4,10 +4,11 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "src/main.ts",
|
"main": "src/main.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "ncc build --source-map --minify --license licenses.txt",
|
"build": "esbuild src/main.ts --bundle --platform=node --target=node24 --format=cjs --outfile=dist/index.cjs --sourcemap --minify && yarn run license",
|
||||||
"lint": "eslint --max-warnings=0 .",
|
"lint": "eslint --max-warnings=0 .",
|
||||||
"format": "eslint --fix .",
|
"format": "eslint --fix .",
|
||||||
"test": "vitest run"
|
"test": "vitest run",
|
||||||
|
"license": "generate-license-file --input package.json --output dist/licenses.txt --overwrite --ci --no-spinner --eol lf"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -32,12 +33,13 @@
|
|||||||
"@types/node": "^24.11.0",
|
"@types/node": "^24.11.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
"@typescript-eslint/eslint-plugin": "^8.56.1",
|
||||||
"@typescript-eslint/parser": "^8.56.1",
|
"@typescript-eslint/parser": "^8.56.1",
|
||||||
"@vercel/ncc": "^0.38.4",
|
|
||||||
"@vitest/coverage-v8": "^4.0.18",
|
"@vitest/coverage-v8": "^4.0.18",
|
||||||
"@vitest/eslint-plugin": "^1.6.9",
|
"@vitest/eslint-plugin": "^1.6.9",
|
||||||
|
"esbuild": "^0.28.0",
|
||||||
"eslint": "^9.39.3",
|
"eslint": "^9.39.3",
|
||||||
"eslint-config-prettier": "^10.1.8",
|
"eslint-config-prettier": "^10.1.8",
|
||||||
"eslint-plugin-prettier": "^5.5.5",
|
"eslint-plugin-prettier": "^5.5.5",
|
||||||
|
"generate-license-file": "^4.1.1",
|
||||||
"globals": "^17.3.0",
|
"globals": "^17.3.0",
|
||||||
"prettier": "^3.8.1",
|
"prettier": "^3.8.1",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
|
|||||||
Reference in New Issue
Block a user