Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing tag "latest" on container images uploaded to ghcr.io #786

Closed
echoix opened this issue Feb 12, 2023 · 2 comments · Fixed by #794
Closed

Missing tag "latest" on container images uploaded to ghcr.io #786

echoix opened this issue Feb 12, 2023 · 2 comments · Fixed by #794

Comments

@echoix
Copy link
Contributor

echoix commented Feb 12, 2023

Describe the bug
A clear and concise description of what the bug is.

The container images stored on GitHub (ghcr.io) do not contain the latest tag. It is only possible to get a specific version tag.

To Reproduce
Steps to reproduce the behavior:

  1. Run docker pull ghcr.io/mgechev/revive
  2. See error
docker pull ghcr.io/mgechev/revive
Using default tag: latest
Error response from daemon: manifest unknown
  1. See available packages on https://github.com/mgechev/revive/pkgs/container/revive

Expected behavior
A clear and concise description of what you expected to happen.
Be able to get the latest release with ghcr.io/mgechev/revive:latest

Logs
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Ubuntu 18.04]
  • Version of Go

Additional context
Add any other context about the problem here.

@echoix
Copy link
Contributor Author

echoix commented Feb 12, 2023

The solution would be to edit the release.yml https://github.com/mgechev/revive/blob/a4f4632a3f934868012008d36eecafb912282d45/.github/workflows/release.yml
in order to have another tag:

So change this:

dockers:
- image_templates: ["ghcr.io/mgechev/revive:{{ .Version }}"]
  dockerfile: Dockerfile
  build_flag_templates:
  - --label=org.opencontainers.image.title={{ .ProjectName }}
  - --label=org.opencontainers.image.description={{ .ProjectName }}
  - --label=org.opencontainers.image.url=https://github.com/mgechev/revive
  - --label=org.opencontainers.image.source=https://github.com/mgechev/revive
  - --label=org.opencontainers.image.version={{ .Version }}
  - --label=org.opencontainers.image.revision={{ .FullCommit }}
  - --label=org.opencontainers.image.licenses=MIT

To this:

dockers:
  - image_templates: 
    - "ghcr.io/mgechev/revive:{{ .Version }}"
    - "ghcr.io/mgechev/revive:latest"
    dockerfile: Dockerfile
    build_flag_templates:
      - --label=org.opencontainers.image.title={{ .ProjectName }}
      - --label=org.opencontainers.image.description={{ .ProjectName }}
      - --label=org.opencontainers.image.url=https://github.com/mgechev/revive
      - --label=org.opencontainers.image.source=https://github.com/mgechev/revive
      - --label=org.opencontainers.image.version={{ .Version }}
      - --label=org.opencontainers.image.revision={{ .FullCommit }}
      - --label=org.opencontainers.image.licenses=MIT

@chavacava
Copy link
Collaborator

Hi, @echoix thanks for filling the issue.
Your fix proposal seems OK, please make a PR.
à toi de jouer. a+

echoix added a commit to echoix/revive that referenced this issue Feb 18, 2023
fixes Missing tag "latest" on container images uploaded to ghcr.io mgechev#786
chavacava pushed a commit that referenced this issue Feb 23, 2023
fixes Missing tag "latest" on container images uploaded to ghcr.io #786
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants