fix: add name to GitHub actions #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update Docker Hub Description | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - .github/workflows/dockerhub-description.yml | |
| - README.md | |
| workflow_dispatch: | |
| jobs: | |
| dockerHubDescription: | |
| name: Update Docker Hub Description | |
| runs-on: ubuntu-latest | |
| # https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#example-using-secrets | |
| env: | |
| dockerhub_user_token: ${{ secrets.DOCKERHUB_USER_TOKEN }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Prepare | |
| id: prep | |
| run: | | |
| echo "repository=$(echo "${{ vars.IMAGE_NAME }}" | tr '[A-Z]' '[a-z]')" >> $GITHUB_OUTPUT | |
| - name: Update Docker Hub Description | |
| uses: peter-evans/dockerhub-description@v5 | |
| if: ${{ !env.ACT && vars.DOCKERHUB_USER_USERNAME != '' && env.dockerhub_user_token != '' }} | |
| with: | |
| username: ${{ vars.DOCKERHUB_USER_USERNAME }} | |
| # OAT (Organisation Access Token) doesn't work yet, use PAT (Personal Access Token) | |
| password: ${{ secrets.DOCKERHUB_USER_TOKEN }} | |
| repository: ${{ steps.prep.outputs.repository }} | |
| # Input exceeding 100 characters will be truncated. | |
| short-description: ${{ github.event.repository.description }} | |
| # readme-filepath: ./README-DOCKERHUB.md | |
| enable-url-completion: true |