Skip to content

Commit 554309a

Browse files
committed
Force the repository name to be lowercase in the custom docker workflow
Converts the repository name to lowercase before storing it as an environment variable for use when connecting to the docker repository. Some (or possibly all?) container registries don't allow their repository names to be capitalized, but the workflow gets the docker repository name from the GitHub repository name (which is allowed to be capitalized), so if the GitHub repository name is capitalized, this can prevent the workflow from working.
1 parent 6860685 commit 554309a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/custom-docker-build-push.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ jobs:
7171
echo ::add-mask::$PASSWORD
7272
echo Registry_Password=$PASSWORD >> $GITHUB_ENV
7373
74-
- name: Add the repository name as an env variable
74+
- name: Add the repository name as an env variable # Lowercase is forced to prevent errors.
7575
run: |
76-
echo "repo_name=${GITHUB_REPOSITORY#*/}" >> "$GITHUB_ENV"
76+
echo "repo_name=${GITHUB_REPOSITORY#*/}" | tr "[:upper:]" "[:lower:]" >> "$GITHUB_ENV"
7777
7878
# Code
7979
- name: Checkout repository

0 commit comments

Comments
 (0)