Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
579f64ca0a | ||
|
|
3f29bdade4 | ||
|
|
8b56ea036f | ||
|
|
2e2fadf6e3 | ||
|
|
015b1b5f51 |
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -92,7 +92,7 @@ jobs:
|
||||
name: dist
|
||||
path: dist
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
|
||||
commit-message: 'build: update distribution'
|
||||
|
||||
@@ -31,7 +31,7 @@ This is useful if you `docker push` your images to Docker Hub. It provides an ea
|
||||
#### Content limits
|
||||
|
||||
DockerHub has content limits.
|
||||
The readme content is limited to 25,000 bytes, and `short-description` is limited to 100 characters.
|
||||
The readme content is limited to 25,000 bytes, and `short-description` is limited to 100 bytes.
|
||||
This action truncates content to prevent the request being rejected.
|
||||
If the content has been truncated a warning will be issued in the run log.
|
||||
|
||||
|
||||
3
dist/index.js
vendored
3
dist/index.js
vendored
@@ -255,12 +255,13 @@ function run() {
|
||||
if (truncatedShortDescription.length !== inputs.shortDescription.length) {
|
||||
core.warning(`The short description exceeds DockerHub's limit and has been truncated to ${SHORT_DESCRIPTION_MAX_BYTES} bytes.`);
|
||||
}
|
||||
core.debug(`Truncated short description: ${truncatedShortDescription}`);
|
||||
// Acquire a token for the Docker Hub API
|
||||
core.info('Acquiring token');
|
||||
const token = yield dockerhubHelper.getToken(inputs.username, inputs.password);
|
||||
// Send a PATCH request to update the description of the repository
|
||||
core.info('Sending PATCH request');
|
||||
yield dockerhubHelper.updateRepositoryDescription(token, inputs.repository, inputs.shortDescription, readmeContent);
|
||||
yield dockerhubHelper.updateRepositoryDescription(token, inputs.repository, truncatedShortDescription, readmeContent);
|
||||
core.info('Request successful');
|
||||
}
|
||||
catch (error) {
|
||||
|
||||
64
package-lock.json
generated
64
package-lock.json
generated
@@ -16,9 +16,9 @@
|
||||
"devDependencies": {
|
||||
"@types/jest": "^27.0.3",
|
||||
"@types/node": "^16.18.23",
|
||||
"@typescript-eslint/parser": "^5.57.0",
|
||||
"@typescript-eslint/parser": "^5.57.1",
|
||||
"@vercel/ncc": "^0.36.1",
|
||||
"eslint": "^8.37.0",
|
||||
"eslint": "^8.38.0",
|
||||
"eslint-plugin-github": "^4.7.0",
|
||||
"eslint-plugin-jest": "^25.7.0",
|
||||
"jest": "^27.5.1",
|
||||
@@ -731,9 +731,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/js": {
|
||||
"version": "8.37.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.37.0.tgz",
|
||||
"integrity": "sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A==",
|
||||
"version": "8.38.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.38.0.tgz",
|
||||
"integrity": "sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
@@ -1405,14 +1405,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "5.57.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.57.0.tgz",
|
||||
"integrity": "sha512-orrduvpWYkgLCyAdNtR1QIWovcNZlEm6yL8nwH/eTxWLd8gsP+25pdLHYzL2QdkqrieaDwLpytHqycncv0woUQ==",
|
||||
"version": "5.57.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.57.1.tgz",
|
||||
"integrity": "sha512-hlA0BLeVSA/wBPKdPGxoVr9Pp6GutGoY380FEhbVi0Ph4WNe8kLvqIRx76RSQt1lynZKfrXKs0/XeEk4zZycuA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "5.57.0",
|
||||
"@typescript-eslint/types": "5.57.0",
|
||||
"@typescript-eslint/typescript-estree": "5.57.0",
|
||||
"@typescript-eslint/scope-manager": "5.57.1",
|
||||
"@typescript-eslint/types": "5.57.1",
|
||||
"@typescript-eslint/typescript-estree": "5.57.1",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
@@ -1432,13 +1432,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "5.57.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.57.0.tgz",
|
||||
"integrity": "sha512-NANBNOQvllPlizl9LatX8+MHi7bx7WGIWYjPHDmQe5Si/0YEYfxSljJpoTyTWFTgRy3X8gLYSE4xQ2U+aCozSw==",
|
||||
"version": "5.57.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.57.1.tgz",
|
||||
"integrity": "sha512-N/RrBwEUKMIYxSKl0oDK5sFVHd6VI7p9K5MyUlVYAY6dyNb/wHUqndkTd3XhpGlXgnQsBkRZuu4f9kAHghvgPw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.57.0",
|
||||
"@typescript-eslint/visitor-keys": "5.57.0"
|
||||
"@typescript-eslint/types": "5.57.1",
|
||||
"@typescript-eslint/visitor-keys": "5.57.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
@@ -1449,9 +1449,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": {
|
||||
"version": "5.57.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.57.0.tgz",
|
||||
"integrity": "sha512-mxsod+aZRSyLT+jiqHw1KK6xrANm19/+VFALVFP5qa/aiJnlP38qpyaTd0fEKhWvQk6YeNZ5LGwI1pDpBRBhtQ==",
|
||||
"version": "5.57.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.57.1.tgz",
|
||||
"integrity": "sha512-bSs4LOgyV3bJ08F5RDqO2KXqg3WAdwHCu06zOqcQ6vqbTJizyBhuh1o1ImC69X4bV2g1OJxbH71PJqiO7Y1RuA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
@@ -1462,13 +1462,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "5.57.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.57.0.tgz",
|
||||
"integrity": "sha512-LTzQ23TV82KpO8HPnWuxM2V7ieXW8O142I7hQTxWIHDcCEIjtkat6H96PFkYBQqGFLW/G/eVVOB9Z8rcvdY/Vw==",
|
||||
"version": "5.57.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.57.1.tgz",
|
||||
"integrity": "sha512-A2MZqD8gNT0qHKbk2wRspg7cHbCDCk2tcqt6ScCFLr5Ru8cn+TCfM786DjPhqwseiS+PrYwcXht5ztpEQ6TFTw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.57.0",
|
||||
"@typescript-eslint/visitor-keys": "5.57.0",
|
||||
"@typescript-eslint/types": "5.57.1",
|
||||
"@typescript-eslint/visitor-keys": "5.57.1",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
@@ -1489,12 +1489,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "5.57.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.57.0.tgz",
|
||||
"integrity": "sha512-ery2g3k0hv5BLiKpPuwYt9KBkAp2ugT6VvyShXdLOkax895EC55sP0Tx5L0fZaQueiK3fBLvHVvEl3jFS5ia+g==",
|
||||
"version": "5.57.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.57.1.tgz",
|
||||
"integrity": "sha512-RjQrAniDU0CEk5r7iphkm731zKlFiUjvcBS2yHAg8WWqFMCaCrD0rKEVOMUyMMcbGPZ0bPp56srkGWrgfZqLRA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.57.0",
|
||||
"@typescript-eslint/types": "5.57.1",
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
},
|
||||
"engines": {
|
||||
@@ -2629,15 +2629,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint": {
|
||||
"version": "8.37.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.37.0.tgz",
|
||||
"integrity": "sha512-NU3Ps9nI05GUoVMxcZx1J8CNR6xOvUT4jAUMH5+z8lpp3aEdPVCImKw6PWG4PY+Vfkpr+jvMpxs/qoE7wq0sPw==",
|
||||
"version": "8.38.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.38.0.tgz",
|
||||
"integrity": "sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@eslint-community/regexpp": "^4.4.0",
|
||||
"@eslint/eslintrc": "^2.0.2",
|
||||
"@eslint/js": "8.37.0",
|
||||
"@eslint/js": "8.38.0",
|
||||
"@humanwhocodes/config-array": "^0.11.8",
|
||||
"@humanwhocodes/module-importer": "^1.0.1",
|
||||
"@nodelib/fs.walk": "^1.2.8",
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
"devDependencies": {
|
||||
"@types/jest": "^27.0.3",
|
||||
"@types/node": "^16.18.23",
|
||||
"@typescript-eslint/parser": "^5.57.0",
|
||||
"@typescript-eslint/parser": "^5.57.1",
|
||||
"@vercel/ncc": "^0.36.1",
|
||||
"eslint": "^8.37.0",
|
||||
"eslint": "^8.38.0",
|
||||
"eslint-plugin-github": "^4.7.0",
|
||||
"eslint-plugin-jest": "^25.7.0",
|
||||
"jest": "^27.5.1",
|
||||
|
||||
@@ -33,6 +33,7 @@ async function run(): Promise<void> {
|
||||
`The short description exceeds DockerHub's limit and has been truncated to ${SHORT_DESCRIPTION_MAX_BYTES} bytes.`
|
||||
)
|
||||
}
|
||||
core.debug(`Truncated short description: ${truncatedShortDescription}`)
|
||||
|
||||
// Acquire a token for the Docker Hub API
|
||||
core.info('Acquiring token')
|
||||
@@ -45,7 +46,7 @@ async function run(): Promise<void> {
|
||||
await dockerhubHelper.updateRepositoryDescription(
|
||||
token,
|
||||
inputs.repository,
|
||||
inputs.shortDescription,
|
||||
truncatedShortDescription,
|
||||
readmeContent
|
||||
)
|
||||
core.info('Request successful')
|
||||
|
||||
Reference in New Issue
Block a user