Closed gaby closed 6 months ago
hi,
thanks, not being familiar with release on gihub registry, but whats the issue here? Seems this will only work if a propper tag is pushed?
provenance mode=max,builder-id=https://github.com/abbbi/virtnbdbackup/actions/runs/8912936010 --tag ghcr.io/abbbi/virtnbdbackup/:master --metadata-file /home/runner/work/_temp/docker-actions-toolkit-fsVHHF/metadata-file --push docker/
ERROR: invalid tag "ghcr.io/abbbi/virtnbdbackup/:master": invalid reference format
Error: buildx failed with: ERROR: invalid tag "ghcr.io/abbbi/virtnbdbackup/:master": invalid reference format
guess this needs something like:
${{ env.IMAGE }}:master
?
got it sorted. Thanks.
@abbbi Seems like I forgot to remove the trailing slash when copy pasting the repo url 😂
Here:
with:
images: |
ghcr.io/abbbi/virtnbdbackup/
^ That trailing slash was the error
@abbbi You need to make packaged public in this repo to be able to download them. https://docs.github.com/en/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#configuring-visibility-of-packages-for-your-personal-account
The image will be ghcr.io/abbbi/virtnbdbackup:master
until a release is done, then it will get semver tagged.
hi,
yes, the package options are set to public. The relase is working now, but for some reason the image published on ghcr.io does not include the latest master checkout but seems to default to the latest relased version:
docker run -it ghcr.io/abbbi/virtnbdbackup:master virtnbdbackup -V
2.9
even tho i have raised the version and the publish went smooth:
https://github.com/abbbi/virtnbdbackup/actions/runs/8913997543
the only thing i noticed in the publish logs is the following message:
https://github.com/abbbi/virtnbdbackup/actions/runs/8913997543/job/24480654980#step:7:152
which is suspicious ..
The docker build checks out the latest master version and installs it:
https://github.com/abbbi/virtnbdbackup/actions/runs/8913997543/job/24480654980#step:7:350
so im wondering whats going on there ..
OK, it seems this was caused by the caching options. I removed them and now it publishes the latest version:
docker run -it ghcr.io/abbbi/virtnbdbackup:master virtnbdbackup -V
2.10
but it think for all stuff to work correctly (with versioned builds) the dockerfile needs ot be improved to checkout the tag:
https://github.com/abbbi/virtnbdbackup/blob/master/docker/Dockerfile#L20
@abbbi Yeah I noticed that. I can make another PR to update the Dockerfile later.
Support for building the image during PR's can also be added (without publishing it).
@abbbi The tags from the repo are not valid semver (missing patch) which is why the CI failed. The three lines in the docker metadata about semver would need to be removed.
@gaby thanks, seems to work now!
This workflow creates the following tags: