-
Notifications
You must be signed in to change notification settings - Fork 65.5k
Closed
Labels
actionsThis issue or pull request should be reviewed by the docs actions teamThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamThis issue or pull request belongs to the Docs Content team
Description
What article on docs.github.com is affected?
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.
Metadata
Metadata
Assignees
Labels
actionsThis issue or pull request should be reviewed by the docs actions teamThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamThis issue or pull request belongs to the Docs Content team