GitHub Action
update-container-description-action
This github action updates the description of a container repo on Docker Hub, Quay or Harbor v2 from a README file.
This is useful when building and pushing Docker images with github actions. It can ensure that the description of a container repo stays in sync with the README file in the github repo.
This action uses docker-pushrm
(speak: Docker Push Readme), a commandline tool and Docker CLI plugin for updating container repo docs.
- create a secret
DOCKER_PASS
in the github repo's settings - add to your
.github/workflows/<workflow>.yml
:
name: Push README to Docker Hub
on: push
jobs:
PushContainerReadme:
runs-on: ubuntu-latest
name: Push README to Docker Hub
steps:
- name: git checkout
uses: actions/checkout@v2
- name: push README to Dockerhub
uses: christian-korneck/update-container-description-action@v1
env:
DOCKER_USER: my-user
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
with:
destination_container_repo: my-user/my-repo
provider: dockerhub
short_description: 'my short description 😊'
readme_file: 'README.md'
- create an api key token in the quay.io webinterface (how to create)
- create a secret
APIKEY__QUAY_IO
in the github repo's settings - add to your
.github/workflows/<workflow>.yml
:
name: Push README to Quay.io
on: push
jobs:
PushContainerReadme:
runs-on: ubuntu-latest
name: Push README to Quay.io
steps:
- name: git checkout
uses: actions/checkout@v2
- name: push README to Quay.io
uses: christian-korneck/update-container-description-action@v1
env:
DOCKER_APIKEY: ${{ secrets.APIKEY__QUAY_IO }}
with:
destination_container_repo: quay.io/my-user/my-repo
provider: quay
readme_file: 'README.md'
- create a secret
HARBOR_PASS
in the github repo's settings - add to your
.github/workflows/<workflow>.yml
:
name: Push README to demo.goharbor.io
on: push
jobs:
PushContainerReadme:
runs-on: ubuntu-latest
name: Push README to demo.goharbor.io
steps:
- name: git checkout
uses: actions/checkout@v2
- name: push README to Dockerhub
uses: christian-korneck/update-container-description-action@v1
env:
DOCKER_USER: my-user
DOCKER_PASS: ${{ secrets.HARBOR_PASS }}
with:
destination_container_repo: demo.goharbor.io/my-project/my-repo
provider: harbor2
readme_file: 'README.md'
Required the destination container repo
Example: my-user/my-repo
or myserver.com/my-user/my-repo
.
Optional repo provider type.
Supported values:
dockerhub
quay
harbor2
Defaults to dockerhub
when not set.
Optional Sets or updates the repo's short description (max. 100 characters). Only for provider dockerhub
.
Optional Path to the source README file
Example: ./my-README.md
Defaults to ./README.md
when not set.
DOCKER_USER
- usernameDOCKER_PASS
- password
DOCKER_APIKEY
- quay.io API key (see here for how to create)
none (just succeeds or fails)
All trademarks belong to their respective owners.