79650660

Date: 2025-06-03 05:30:40
Score: 1
Natty:
Report link

Also facing same issue my Github repo name contain capital letters but Docker require image name (repo) to be lowercase

Below solution worked for me

# add below lines where ever required
 steps:
   ...

   # repo name to lowercase
   - name: Convert repo name to lowercase
     id: lowercase
     run: echo "repo_name_lc=${GITHUB_REPOSITORY##*/}" | tr '[:upper:]' '[:lower:]' >> $GITHUB_ENV

   - name: Build and push
     ...
     with:
         ...
         tags: ${{ secrets.DOCKER_USERNAME }}/${{ env.repo_name_lc }}:latest

Explanation

${GITHUB_REPOSITORY##*/} -> Contain full repo name ##*/ removes everything up to including the last /.

tr '[:upper:]' '[:lower:]' -> translates all uppercase to lowercase letter.

echo "repo_name_lc=..." -> defining the variable

>> $GITHUB_ENV -> appends the line to this file that GitHub Actions uses.

Reasons:
  • Whitelisted phrase (-1): worked for me
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): Also facing same issue
  • Low reputation (0.5):
Posted by: Azhar Uddin Sheikh