Skip to content

ghcr.io only accepts lowercase username - #26

Merged
neutrinoceros merged 2 commits into
h5py:masterfrom
Louwrensth:test
Aug 3, 2026
Merged

neutrinoceros merged 2 commits into
h5py:masterfrom
Louwrensth:test

Conversation

@Louwrensth

Copy link
Copy Markdown
Contributor

No description provided.

@neutrinoceros

Copy link
Copy Markdown
Contributor

This seems unnecessary, maybe I'm mistaken ? I expect the owner account should always be exactly "h5py", unless there's a reason to run this workflow from a fork ?

@Louwrensth

Copy link
Copy Markdown
Contributor Author

Yep, the latter. I wanted to try and run this from my fork, but it complained:

buildx failed with: ERROR: failed to build: invalid tag "ghcr.io/Louwrensth/musllinux_1_2_x86_64-hdf5": repository name must be lowercase

I'll completely understand if you'd like to decline this PR -- for instance, because you don't like the sad clutter I have added with this PR.

So why this clutter? Just to change case!? Madness.

Because ghcr.io cannot handle their own (github.com) "repository_owner" values? More madness lol.

@neutrinoceros

Copy link
Copy Markdown
Contributor

No it's fine ! I'm just on the fence these days with the rise of useless LLM-backed "contributions" so I'd rather ask than assume good intentions as I used to do.

More madness lol.

This is Sparta. 🥲

- name: lowercase repo-owner
run: |
# use Bash to convert to lowercase
echo "REPO_OWNER_LOWER=${GITHUB_REPOSITORY_OWNER,,}" >>${GITHUB_ENV}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may have approved slightly prematurely; I don't think I understand what the commas on this line are for.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it looks obscure doesn't it?

It's legit :

${parameter,,pattern}

‘,’ converts matching uppercase letters to lowercase.

... ‘,,’ variants examine all characters in the expanded value and convert each one that matches pattern. If pattern is omitted, it is treated like a ‘?’, which matches every character.

https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html#

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, this is indeed obscure. I'll add the link as an inline comment and merge. Thank you !

@neutrinoceros
neutrinoceros self-requested a review June 25, 2026 08:58
@neutrinoceros
neutrinoceros merged commit 7f626fe into h5py:master Aug 3, 2026
5 of 7 checks passed
@Louwrensth
Louwrensth deleted the test branch August 7, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants