Select repository by tag

I write a addon and now I want to create repositories/packages.
I have two branches main (production branche) and addon (develop branche)
I have have managed in the workflow that publish the repository to add the branche-name as a tag.
But I get an error in de supervisor when I specify the tag in de image-line in config.yaml.
For instance:
image: “ghcr.io/corneel27/dao-{arch}:addon
is not accepted:
2025-05-08 22:49:45.603 WARNING (SyncWorker_3) [supervisor.store.data] Can't read /data/addons/git/325af97a/dao/config.yaml: does not match regular expression ^([a-z0-9][a-z0-9.\-]*(:[0-9]+)?/)*?([a-z0-9{][a-z0-9.\-_{}]*/)*?([a-z0-9{][a-z0-9.\-_{}]*)$ for dictionary value @ data['image']. Got 'ghcr.io/corneel27/dao-{arch}:addon'

What am I doing wrong?

The regular expression seems to have some bugs, the / characters at columns 34 and 62 need to be escaped to work.
But, even if you fix the regex, it can capture only the string “ghcr.io/corneel27/dao-{arch}”, without “:addon”.

Thank you for your response.
Do you have any idea how I can select a repository with a tag in the image-line of a config.yaml or otherwise: how I can attach the branche-name in the name of the repository?

I’m not sure what do you want to do.
Do you need a regular expression to match a string like the following one?
http://ghcr.io/corneel27/dao-{arch}:addon”

Do you need to extract information from that string?

In any case, you can write your regex and test it with https://regex101.com/

What I want is this:
I build two repositories:

  • one with the tag “addon” (that is my develop branche)
  • one with the tag “main” (that is the production branche)

How can I select one of the two branches in my config.yaml?
I tried “ghcr.io/corneel27/dao-{arch}:addon” but that gives the error.

Ok, now it’s clear.
I don’t know how the github automation works. But the regex used to select the repository cannot accept the branch, it can only accept the repository. there may be present an option, in the yaml sintax, to select the branch.

I made an other solution: branche-name in the image name.
That works!
Thanks for your attention!

1 Like