Skip to content

add ghcli

add ghcli #26

name: Docker Hub Description
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "**/docs/**"
- ".github/workflows/docker-hub-description.yml"
concurrency: docker_hub_description_${{ github.ref }}
jobs:
prepare-folders:
name: Prepare Folders
uses: ./.github/workflows/prepare-folders.yml
docker-hub:
needs: prepare-folders
runs-on: ubuntu-latest
name: Docker Hub Update
strategy:
matrix:
directories: ${{ fromJSON(needs.prepare-folders.outputs.directories) }}
environment:
name: dockerhub
url: "https://hub.docker.com/repository/docker/${{ vars.DOCKERHUB_USERNAME }}/${{ matrix.directories }}/general"
steps:
- name: Checkout 🔔
uses: actions/checkout@v3
with:
fetch-depth: 1
- id: read_files
name: Read files
run: |
echo "short_description=$(cat ./${{ matrix.directories }}/docs/short_description.txt)" >> $GITHUB_OUTPUT
- name: Description Update ${{ matrix.directories }}
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ vars.DOCKERHUB_USERNAME }}/${{ matrix.directories }}
short-description: ${{ steps.read_files.outputs.short_description }}
readme-filepath: "./${{ matrix.directories }}/docs/README.md"