Skip to content

CVS-175243 use primary hf token openvino#3818

Open
jkoniusz wants to merge 26 commits into
masterfrom
CVS-175243-use-primary-hf-token-openvino
Open

CVS-175243 use primary hf token openvino#3818
jkoniusz wants to merge 26 commits into
masterfrom
CVS-175243-use-primary-hf-token-openvino

Conversation

@jkoniusz
Copy link
Copy Markdown

@jkoniusz jkoniusz commented May 7, 2026

Description

Pass HF_TOKEN using file instead of environment variables, use the primary token so that API rate limit isn't being exceeded (secondary token will be used in openvino repo(1000 requests token), the primary token will be still used in openvino genai repo(2500 requests token))

CVS-175243

Fixes #(issue)

Checklist:

  • This PR follows GenAI Contributing guidelines.
  • Tests have been updated or added to cover the new code.
  • This PR fully addresses the ticket.
  • I have made corresponding changes to the documentation.

@jkoniusz jkoniusz requested a review from akashchi as a code owner May 7, 2026 10:53
Copilot AI review requested due to automatic review settings May 7, 2026 10:53
@github-actions github-actions Bot added the category: GHA CI based on Github actions label May 7, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates CI workflows to switch Hugging Face authentication from an environment-passed token to a mounted secrets file, aiming to avoid HF API rate limit issues.

Changes:

  • Added HF_TOKEN_PATH env var and mounted /home/runner/secrets/huggingface into several container jobs.
  • Removed passing HF_TOKEN into container jobs via container.options.
  • Minor text changes in workflow step naming and CODEOWNERS comments.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
.github/workflows/manylinux_2_28.yml Adds HF token file path + secrets mount; removes container env passthrough for HF token.
.github/workflows/linux.yml Same HF token file path + secrets mount change; includes a step-name typo.
.github/CODEOWNERS Comment-only change (introduces an accidental trailing character).
Comments suppressed due to low confidence (1)

.github/workflows/linux.yml:735

  • Typo in step name: Download Build Artifactsx looks accidental and will make logs/searching inconsistent. Rename back to Download Build Artifacts.
      - name: Download Build Artifacts

Comment thread .github/workflows/linux.yml Outdated
Comment on lines +38 to +40
# To switch to the secondary HF token, replace `token-primary` with `token-secondary`:
# HF_TOKEN_PATH: /home/runner/secrets/huggingface/token-secondary
HF_TOKEN_PATH: /home/runner/secrets/huggingface/token-primary
Comment thread .github/workflows/linux.yml Outdated
Comment on lines +38 to +40
# To switch to the secondary HF token, replace `token-primary` with `token-secondary`:
# HF_TOKEN_PATH: /home/runner/secrets/huggingface/token-secondary
HF_TOKEN_PATH: /home/runner/secrets/huggingface/token-primary
Comment thread .github/workflows/manylinux_2_28.yml Outdated
Comment on lines +38 to +40
# To switch to the secondary HF token, replace `token-primary` with `token-secondary`:
# HF_TOKEN_PATH: /home/runner/secrets/huggingface/token-secondary
HF_TOKEN_PATH: /home/runner/secrets/huggingface/token-primary
Comment thread .github/workflows/manylinux_2_28.yml Outdated
Comment on lines +38 to +40
# To switch to the secondary HF token, replace `token-primary` with `token-secondary`:
# HF_TOKEN_PATH: /home/runner/secrets/huggingface/token-secondary
HF_TOKEN_PATH: /home/runner/secrets/huggingface/token-primary
Copilot AI review requested due to automatic review settings May 7, 2026 16:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

Comment on lines +732 to +733
echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"

Comment on lines +840 to +841
echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"

- name: Setup Variables
run: |
echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"

- name: Setup Variables
run: |
echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"

Comment thread .github/workflows/linux.yml Outdated
Comment on lines +38 to +42
# To switch to the primary HF token, change the filename from `token-secondary` to `token-primary`:
# HF_TOKEN_PATH_LIN: /home/runner/secrets/huggingface/token-primary
# HF_TOKEN_PATH_WIN: "C:\\mount\\secrets\\huggingface\\token-primary"
HF_TOKEN_PATH_LIN: /home/runner/secrets/huggingface/token-secondary
HF_TOKEN_PATH_WIN: "C:\\mount\\secrets\\huggingface\\token-secondary"
- name: Setup Variables
run: |
echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"

Comment on lines +711 to +712
echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"

Comment thread .github/workflows/manylinux_2_28.yml Outdated
Comment on lines +38 to +42
# To switch to the primary HF token, change the filename from `token-secondary` to `token-primary`:
# HF_TOKEN_PATH_LIN: /home/runner/secrets/huggingface/token-primary
# HF_TOKEN_PATH_WIN: "C:\\mount\\secrets\\huggingface\\token-primary"
HF_TOKEN_PATH_LIN: /home/runner/secrets/huggingface/token-secondary
HF_TOKEN_PATH_WIN: "C:\\mount\\secrets\\huggingface\\token-secondary"
Copilot AI review requested due to automatic review settings May 8, 2026 10:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

- name: Setup Variables
run: |
echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"

steps:
- name: Setup Variables
run: |
echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"
steps:
- name: Setup Variables
run: |
echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"
steps:
- name: Setup Variables
run: |
echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"
Comment thread .github/workflows/linux.yml Outdated
Comment on lines +38 to +42
# To switch to the primary HF token, change the filename from `token-secondary` to `token-primary`:
# HF_TOKEN_PATH_LIN: /home/runner/secrets/huggingface/token-primary
# HF_TOKEN_PATH_WIN: "C:\\mount\\secrets\\huggingface\\token-primary"
HF_TOKEN_PATH_LIN: /home/runner/secrets/huggingface/token-secondary
HF_TOKEN_PATH_WIN: "C:\\mount\\secrets\\huggingface\\token-secondary"
- name: Setup Variables
run: |
echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"

steps:
- name: Setup Variables
run: |
echo "HF_TOKEN_PATH=${{ runner.os == 'Linux' && env.HF_TOKEN_PATH_LIN || env.HF_TOKEN_PATH_WIN }}" >> "$GITHUB_ENV"
Comment thread .github/workflows/manylinux_2_28.yml Outdated
Comment on lines +38 to +42
# To switch to the primary HF token, change the filename from `token-secondary` to `token-primary`:
# HF_TOKEN_PATH_LIN: /home/runner/secrets/huggingface/token-primary
# HF_TOKEN_PATH_WIN: "C:\\mount\\secrets\\huggingface\\token-primary"
HF_TOKEN_PATH_LIN: /home/runner/secrets/huggingface/token-secondary
HF_TOKEN_PATH_WIN: "C:\\mount\\secrets\\huggingface\\token-secondary"
Copy link
Copy Markdown
Author

@jkoniusz jkoniusz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in similar way like in openvino repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: GHA CI based on Github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants