Skip to content

Conversation

@ProjectZeroDays
Copy link
Owner

@ProjectZeroDays ProjectZeroDays commented Jan 21, 2025

Add a new workflow to sync the repository with Huggingface code space.

  • Workflow: Add sync_huggingface.yml in .github/workflows/ to trigger on push and pull_request events for the main branch. Include steps to checkout the repository, set up Python, install dependencies, and sync with Huggingface using the Huggingface API key from codespace_user_secrets.json.
  • Kubernetes Deployment: Update infra/k8s_deployment.yaml and infra/k8s/deployment.yaml to add HUGGINGFACE_API_KEY environment variable to the env section, referencing the Huggingface API key from a secret.

For more details, open the Copilot Workspace session.

Add a new workflow to sync the repository with Huggingface code space.

* **Workflow**: Add `sync_huggingface.yml` in `.github/workflows/` to trigger on push and pull_request events for the main branch. Include steps to checkout the repository, set up Python, install dependencies, and sync with Huggingface using the Huggingface API key from `codespace_user_secrets.json`.
* **Kubernetes Deployment**: Update `infra/k8s_deployment.yaml` and `infra/k8s/deployment.yaml` to add `HUGGINGFACE_API_KEY` environment variable to the `env` section, referencing the Huggingface API key from a secret.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/ProjectZeroDays/Project-Red-Sword?shareId=XXXX-XXXX-XXXX-XXXX).
@ProjectZeroDays ProjectZeroDays merged commit 3e2a8f3 into Your-Momma-Beeotch Jan 21, 2025
5 of 10 checks passed
@ProjectZeroDays ProjectZeroDays deleted the sync-huggingface branch January 21, 2025 12:22
@ProjectZeroDays ProjectZeroDays restored the sync-huggingface branch January 21, 2025 12:22
Comment on lines +13 to +33
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

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants