{"id":13474670,"url":"https://github.com/peter-evans/dockerhub-description","last_synced_at":"2025-05-14T16:11:19.821Z","repository":{"id":35504438,"uuid":"193685475","full_name":"peter-evans/dockerhub-description","owner":"peter-evans","description":"A GitHub action to update a Docker Hub repository description from README.md","archived":false,"fork":false,"pushed_at":"2024-10-27T14:45:18.000Z","size":1523,"stargazers_count":332,"open_issues_count":2,"forks_count":52,"subscribers_count":9,"default_branch":"main","last_synced_at":"2024-10-29T15:48:34.991Z","etag":null,"topics":["docker","dockerhub","dockerhub-description","github-action"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peter-evans.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"peter-evans"}},"created_at":"2019-06-25T10:19:47.000Z","updated_at":"2024-10-27T14:45:14.000Z","dependencies_parsed_at":"2024-02-18T15:24:04.979Z","dependency_job_id":"a1b25c4c-ab02-4587-ac6e-7a7fcdcd37a9","html_url":"https://github.com/peter-evans/dockerhub-description","commit_stats":{"total_commits":321,"total_committers":6,"mean_commits":53.5,"dds":"0.42367601246105924","last_synced_commit":"e998ab2b91819df14673fcfdc19b6a376b22419e"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Fdockerhub-description","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Fdockerhub-description/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Fdockerhub-description/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Fdockerhub-description/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peter-evans","download_url":"https://codeload.github.com/peter-evans/dockerhub-description/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248631669,"owners_count":21136554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","dockerhub","dockerhub-description","github-action"],"created_at":"2024-07-31T16:01:13.956Z","updated_at":"2025-04-12T20:39:14.993Z","avatar_url":"https://github.com/peter-evans.png","language":"TypeScript","readme":"# Docker Hub Description\n[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-Docker%20Hub%20Description-blue.svg?colorA=24292e\u0026colorB=0366d6\u0026style=flat\u0026longCache=true\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAM6wAADOsB5dZE0gAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAERSURBVCiRhZG/SsMxFEZPfsVJ61jbxaF0cRQRcRJ9hlYn30IHN/+9iquDCOIsblIrOjqKgy5aKoJQj4O3EEtbPwhJbr6Te28CmdSKeqzeqr0YbfVIrTBKakvtOl5dtTkK+v4HfA9PEyBFCY9AGVgCBLaBp1jPAyfAJ/AAdIEG0dNAiyP7+K1qIfMdonZic6+WJoBJvQlvuwDqcXadUuqPA1NKAlexbRTAIMvMOCjTbMwl1LtI/6KWJ5Q6rT6Ht1MA58AX8Apcqqt5r2qhrgAXQC3CZ6i1+KMd9TRu3MvA3aH/fFPnBodb6oe6HM8+lYHrGdRXW8M9bMZtPXUji69lmf5Cmamq7quNLFZXD9Rq7v0Bpc1o/tp0fisAAAAASUVORK5CYII=)](https://github.com/marketplace/actions/docker-hub-description)\n\nA GitHub action to update a Docker Hub repository description from `README.md`.\n\nThis is useful if you `docker push` your images to Docker Hub. It provides an easy, automated way to keep your Docker Hub repository description in sync with your GitHub repository `README.md` file.\n\n## Usage\n\n```yml\n    - uses: actions/checkout@v4\n\n    - name: Docker Hub Description\n      uses: peter-evans/dockerhub-description@v4\n      with:\n        username: ${{ secrets.DOCKERHUB_USERNAME }}\n        password: ${{ secrets.DOCKERHUB_PASSWORD }}\n        repository: peterevans/dockerhub-description\n```\n\n### Action inputs\n\n| Name | Description | Default |\n| --- | --- | --- |\n| `username` | (**required**) Docker Hub username. If updating a Docker Hub repository belonging to an organization, this user must have `Admin` permissions for the repository. | |\n| `password` | (**required**) Docker Hub password or [Personal Access Token](https://docs.docker.com/docker-hub/access-tokens/) with `read/write/delete` scope. | |\n| `repository` | Docker Hub repository in the format `\u003cnamespace\u003e/\u003cname\u003e`. | `github.repository` |\n| `short-description` | Docker Hub repository short description. | |\n| `readme-filepath` | Path to the repository readme. | `./README.md` |\n| `enable-url-completion` | Enables completion of relative URLs to absolute ones. See also [known Issues](#url-completion-known-issues). | `false` |\n| `image-extensions` | File extensions that will be treated as images. | `bmp,gif,jpg,jpeg,png,svg,webp` |\n\n#### Content limits\n\nDockerHub has content limits.\nThe readme content is limited to 25,000 bytes, and `short-description` is limited to 100 bytes.\nThis action truncates content to prevent the request being rejected.\nIf the content has been truncated a warning will be issued in the run log.\n\n#### Specifying the file path\n\nThe action assumes that there is a file called `README.md` located at the root of the repository.\nIf this is not the case the path can be specified with the `readme-filepath` input.\n\n```yml\n    - name: Docker Hub Description\n      uses: peter-evans/dockerhub-description@v4\n      with:\n        username: ${{ secrets.DOCKERHUB_USERNAME }}\n        password: ${{ secrets.DOCKERHUB_PASSWORD }}\n        repository: peterevans/dockerhub-description\n        readme-filepath: ./path/to/README.md\n```\n\n#### Using the GitHub repository description\n\nThe GitHub repository description can be used for the Docker Hub `short-descripton` by passing the description from the event context.\n\n```yml\n    - name: Docker Hub Description\n      uses: peter-evans/dockerhub-description@v4\n      with:\n        username: ${{ secrets.DOCKERHUB_USERNAME }}\n        password: ${{ secrets.DOCKERHUB_PASSWORD }}\n        repository: peterevans/dockerhub-description\n        short-description: ${{ github.event.repository.description }}\n```\n\n### Examples\n\nThe following workflow updates the Docker Hub repository description whenever there are changes to `README.md` and the workflow file itself on the `main` branch. This workflow assumes its location to be `.github/workflows/dockerhub-description.yml`.\n\n```yml\nname: Update Docker Hub Description\non:\n  push:\n    branches:\n      - main\n    paths:\n      - README.md\n      - .github/workflows/dockerhub-description.yml\njobs:\n  dockerHubDescription:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v4\n\n    - name: Docker Hub Description\n      uses: peter-evans/dockerhub-description@v4\n      with:\n        username: ${{ secrets.DOCKERHUB_USERNAME }}\n        password: ${{ secrets.DOCKERHUB_PASSWORD }}\n        repository: peterevans/dockerhub-description\n        short-description: ${{ github.event.repository.description }}\n        enable-url-completion: true\n```\n\nUpdates the Docker Hub repository description whenever a new release is created.\n\n```yml\nname: Update Docker Hub Description\non: release\njobs:\n  dockerHubDescription:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/checkout@v4\n\n    - name: Docker Hub Description\n      uses: peter-evans/dockerhub-description@v4\n      with:\n        username: ${{ secrets.DOCKERHUB_USERNAME }}\n        password: ${{ secrets.DOCKERHUB_PASSWORD }}\n        repository: peterevans/dockerhub-description\n        short-description: ${{ github.event.repository.description }}\n```\n\n### URL completion known Issues\n\nThe completion of relative URLs has some known issues:\n\n1. Relative markdown links in inline-code and code blocks **are also converted**:\n\n   ```markdown\n   [link in inline code](#table-of-content)\n   ```\n\n   will be converted into\n\n   ```markdown\n   [link in inline code](https://github.com/peter-evans/dockerhub-description/blob/main/./README.md#table-of-content)\n   ```\n\n2. Links containing square brackets (`]`) in the text fragment **are not converted**:\n\n   ```markdown\n   [[link text with square brackets]](#table-of-content)\n   ```\n\n3. [Reference-style links/images](https://www.markdownguide.org/basic-syntax/#reference-style-links) **are not converted**.\n\n   ```markdown\n   [table-of-content][toc]\n\n   ...\n\n   [toc]: #table-of-content \"Table of content\"\n   ```\n\n## Using the Docker image independently of GitHub Actions\n\nThe image can be executed in other environments independently of GitHub Actions.\nSimply volume mount the location of the `README.md` file to the container and set environment variables as follows.\n\n```bash\ndocker run -v $PWD:/workspace \\\n  -e DOCKERHUB_USERNAME='user1' \\\n  -e DOCKERHUB_PASSWORD='xxxxx' \\\n  -e DOCKERHUB_REPOSITORY='user1/my-docker-image' \\\n  -e README_FILEPATH='/workspace/README.md' \\\n  peterevans/dockerhub-description:3\n```\n\n## License\n\n[MIT](LICENSE)\n","funding_links":["https://github.com/sponsors/peter-evans"],"categories":["Community Resources","TypeScript","Uncategorized"],"sub_categories":["Deployment","Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-evans%2Fdockerhub-description","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeter-evans%2Fdockerhub-description","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-evans%2Fdockerhub-description/lists"}