GitHub Action
Docker Hub README & description sync
Github Action to sync README.md
from Github to Docker Hub
See action.yml
As of right now, this action will not work if you have 2FA on Docker Hub enabled!
It's impossible to login automatically when 2FA is used, and using Docker API Token results with:
{"detail": "access to the resource is forbidden with personal access token"}
I'll try to update it as soon as the solution is found, and any suggestions welcome.
If your user
-name, and the repo path (slug
) are both the same on Github and Docker Hub, and README.md
is located at repo's root, it's enough to:
steps:
- uses: actions/checkout@master
- uses: meeDamian/[email protected]
with:
pass: ${{ secrets.DOCKER_PASS }}
description: true
If everything needs to be specified:
steps:
- uses: actions/checkout@master
- uses: meeDamian/[email protected]
with:
user: docker-username
pass: ${{ secrets.DOCKER_PASS }}
slug: organization/image-name
readme: ./docker/description.md
description: A must-have container, that you can't live without.
NOTE: Add Docker Hub password to "Secrets" section in your repo's settings.
NOTE_1: Docker Hub requires
user
, andslug
to be lowercase. Conversion is done automatically for you, so that Github'smeeDamian
becomesmeedamian
when passed to Docker.
NOTE_2:
description
sets Docker Hub short description to its literal content in all cases, except when it's set totrue
, when Github repo description is used instead. When skipped, no change is made to Docker Hub description.
NOTE_3:
master
branch may sometimes be broken, or change behavior. It's highly recommended to always use tags.
The scripts and documentation in this project are released under the MIT License