Skip to content

Commit f323a88

Browse files
authored
Added HF_TOKEN to github actions (#465)
## Problem Describe the purpose of this change. What problem is being solved and why? Need a HF_TOKEN to appropriately run certain notebooks on CI/CD. ## Solution Describe the approach you took. Link to any relevant bugs, issues, docs, or other resources. Added one to three files in github actions where test notebook script is run on changes: - test-notebooks-changed - test-notebook-all - action.yml that coordinate the above. Added as required input and as arguments. ## Type of Change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update - [ ] Infrastructure change (CI configs, etc) - [ ] Non-code change (docs, etc) - [ ] None of the above: (explain here) ## Test Plan Describe specific steps for validating this change.
1 parent 4018311 commit f323a88

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.github/actions/run-notebook/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ inputs:
1111
OPENAI_API_KEY:
1212
description: "The OpenAI API key"
1313
required: true
14+
HF_TOKEN:
15+
description: "The Hugging Face token"
16+
required: true
1417

1518
runs:
1619
using: 'composite'
@@ -48,4 +51,5 @@ runs:
4851
bash ${{ steps.convert.outputs.script_path }}
4952
env:
5053
PINECONE_API_KEY: ${{ inputs.PINECONE_API_KEY }}
51-
OPENAI_API_KEY: ${{ inputs.OPENAI_API_KEY }}
54+
OPENAI_API_KEY: ${{ inputs.OPENAI_API_KEY }}
55+
HF_TOKEN: ${{ inputs.HF_TOKEN }}

.github/workflows/test-notebooks-all.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ jobs:
4444
notebook: ${{ matrix.notebook }}
4545
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
4646
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
47+
HF_TOKEN: ${{ secrets.HF_TOKEN }}

.github/workflows/test-notebooks-changed.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
notebook: ${{ matrix.notebook }}
6161
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
6262
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
63+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
6364

6465
check-links:
6566
needs:

0 commit comments

Comments
 (0)