5 Commits

Author SHA1 Message Date
Peter Evans
579f64ca0a fix: use the truncated short description (#148)
Some checks failed
Publish Docker Image / publish (push) Has been cancelled
2023-04-10 08:18:10 +09:00
dependabot[bot]
3f29bdade4 build(deps-dev): bump eslint from 8.37.0 to 8.38.0 (#146)
Bumps [eslint](https://github.com/eslint/eslint) from 8.37.0 to 8.38.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.37.0...v8.38.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-09 14:58:56 +00:00
dependabot[bot]
8b56ea036f build(deps-dev): bump @typescript-eslint/parser from 5.57.0 to 5.57.1 (#144)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.57.0 to 5.57.1.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.57.1/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-09 14:58:35 +00:00
dependabot[bot]
2e2fadf6e3 build(deps): bump peter-evans/create-pull-request from 4 to 5 (#145)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 4 to 5.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v4...v5)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-09 14:58:34 +00:00
Peter Evans
015b1b5f51 docs: update readme 2023-04-07 09:21:58 +09:00
6 changed files with 40 additions and 38 deletions

View File

@@ -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'

View File

@@ -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
View File

@@ -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
View File

@@ -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",

View File

@@ -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",

View File

@@ -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')