-
Notifications
You must be signed in to change notification settings - Fork 5
Fix FILE parameter resolution in publish-model-card workflow to be relative to repository root #36
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
base: main
Are you sure you want to change the base?
Conversation
…from root Co-authored-by: kiview <[email protected]>
FILE
parameter relative to the root.
@docker/model-cards/files/.github/workflows/publish-model-card.yml
Testing it by running it from the PR branch: https://github.com/docker/model-cards/actions/runs/16266732255 |
The workflow run from this brand failed:
It looks like the secrets are not correctly provided to the Makefile or the tool. |
... The authentication error is not related to my changes to fix the FILE parameter resolution. The error "Cannot log into an organization account" suggests an issue with the Docker Hub credentials or account configuration, not with how the workflow calls the Makefile. My changes are working correctly - the tool successfully finds the file ( The authentication failure appears to be a repository secrets/Docker Hub account configuration issue that's separate from the FILE path resolution fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, that seems to be an issue with the permissions of my OAT token. The PR itself looks fine for what it wants to fix.
Problem
The
publish-model-card.yml
GitHub Actions workflow was running themake upload-overview
command from thetools/model-cards-cli
subdirectory usingmake -C tools/model-cards-cli upload-overview
. This caused theFILE
input parameter to be resolved relative to thetools/model-cards-cli
directory instead of the repository root.For example, when a user specified:
The workflow would look for the file at
tools/model-cards-cli/ai/llama3.1.md
(which doesn't exist) instead of the correct location atai/llama3.1.md
relative to the repository root.Solution
tools/model-cards-cli/Makefile
for building the CLI tool but runs from the repository rootmake upload-overview
from the repository root instead ofmake -C tools/model-cards-cli upload-overview
Changes
Makefile
at repository root withupload-overview
target that:tools/model-cards-cli/Makefile
.github/workflows/publish-model-card.yml
to:make -C tools/model-cards-cli upload-overview
tomake upload-overview
Testing
Verified that:
ai/llama3.1.md
is now found correctly from repository roottemplate.md
works for root-level filestools/model-cards-cli
remains unchangedImpact
Users can now specify FILE parameters relative to the repository root as expected:
The existing
tools/model-cards-cli/Makefile
remains unchanged, so any direct usage of that Makefile continues to work as before.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.