GithubHelp home page GithubHelp logo

christian-korneck / update-container-description-action Goto Github PK

View Code? Open in Web Editor NEW
24.0 2.0 1.0 3 KB

github action to update a Docker Hub, Quay or Harbor repository description from a README file

License: MIT License

github-actions containers docker dockerhub quay harbor container-registry ci cd github

update-container-description-action's Introduction

Update Container Description

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.

Background

This action uses docker-pushrm (speak: Docker Push Readme), a commandline tool and Docker CLI plugin for updating container repo docs.

Example for Docker Hub

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

Example for Quay

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

Example for Harbor v2

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

Reference

Inputs

destination_container_repo

Required the destination container repo
Example: my-user/my-repo or myserver.com/my-user/my-repo.

provider

Optional repo provider type.

Supported values:

  • dockerhub
  • quay
  • harbor2

Defaults to dockerhub when not set.

short_description

Optional Sets or updates the repo's short description (max. 100 characters). Only for provider dockerhub.

readme_file

Optional Path to the source README file
Example: ./my-README.md

Defaults to ./README.md when not set.

Required env vars

for providers dockerhub, harbor2:

  • DOCKER_USER - username
  • DOCKER_PASS - password

for provider quay:

  • DOCKER_APIKEY - quay.io API key (see here for how to create)

Outputs

none (just succeeds or fails)


All trademarks belong to their respective owners.

update-container-description-action's People

Contributors

christian-korneck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

abitmore

update-container-description-action's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.