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

Example for Publishing Docker images to GitHub Packages broken #7424

Closed
bananer opened this issue Jun 16, 2021 · 3 comments
Closed

Example for Publishing Docker images to GitHub Packages broken #7424

bananer opened this issue Jun 16, 2021 · 3 comments
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team

Comments

@bananer
Copy link

bananer commented Jun 16, 2021

What article on docs.github.com is affected?

https://docs.github.com/en/actions/guides/publishing-docker-images#publishing-images-to-github-packages

What part(s) of the article would you like to see updated?

In the example file, the tag is specified like this:

docker.pkg.github.com/${{ github.repository }}/octo-image:${{ github.ref }}

However, the variable github.ref resolved to something like refs/heads/my_branch_name (as documented).

This causes the step to fail:

error: invalid tag "docker.pkg.github.com/bananer/my-repo/mps:refs/heads/my_branch_name": invalid reference format
Error: buildx call failed with: error: invalid tag "docker.pkg.github.com/bananer/my-repo/mps:refs/heads/my_branch_name": invalid reference format

Additional information

My goal is to publish to a docker tag matching my branch name, assuming this is also the intent of the example. Seems like there is no official way to get the branch name without refs/heads/ prefix in the official docs.

@bananer bananer added the content This issue or pull request belongs to the Docs Content team label Jun 16, 2021
@welcome
Copy link

welcome bot commented Jun 16, 2021

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Jun 16, 2021
@janiceilene
Copy link
Contributor

Thanks for opening an issue @bananer! I'll get this triaged for the team to take a look 👀

@janiceilene janiceilene added actions This issue or pull request should be reviewed by the docs actions team and removed triage Do not begin working on this issue until triaged by the team labels Jun 18, 2021
@skedwards88
Copy link
Contributor

Thank you for opening this issue! ✨ We have an update (now live) that no longer uses github.ref in the tag name, so I believe this should be resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team
Projects
None yet
Development

No branches or pull requests

4 participants
@bananer @janiceilene @skedwards88 and others