Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/sync_huggingface.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Sync with Huggingface

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
sync:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Sync with Huggingface
env:
HUGGINGFACE_API_KEY: ${{ secrets.HUGGINGFACE_API_KEY }}
run: |
python sync_huggingface.py
Comment on lines +13 to +33

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
7 changes: 6 additions & 1 deletion infra/k8s/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -18,3 +17,9 @@ spec:
image: cybersecurity/framework:latest
ports:
- containerPort: 5000
env:
- name: HUGGINGFACE_API_KEY
valueFrom:
secretKeyRef:
name: huggingface-secret
key: api_key
6 changes: 5 additions & 1 deletion infra/k8s_deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -24,3 +23,8 @@ spec:
secretKeyRef:
name: openai-secret
key: api_key
- name: HUGGINGFACE_API_KEY
valueFrom:
secretKeyRef:
name: huggingface-secret
key: api_key
Loading