Skip to content

Commit

Permalink
use secret
Browse files Browse the repository at this point in the history
  • Loading branch information
zzstoatzz committed Jan 5, 2024
1 parent 338cbcd commit 4f08400
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/workflows/pr_views_to_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
# paths:
# - 'views/aggregate-worker-metadata.json'

env:
PREFECT_API_KEY: ${{ secrets.PREFECT_PRD_INTEGRATIONS_WORKSPACE_API_KEY }}

jobs:
update-views:
name: Send updated views to PrefectHQ/prefect
Expand All @@ -26,6 +29,9 @@ jobs:
python -m pip install --upgrade pip
python -m pip install --upgrade --upgrade-strategy eager -e ".[dev]"
- name: Set workspace
run: prefect cloud workspace set -w prefect-technologies/integrations

- name: Open PRs to PrefectHQ/prefect
run: python src/pr_views_to_core.py

4 changes: 3 additions & 1 deletion src/pr_views_to_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
import httpx
from datetime import datetime

GITHUB_TOKEN = os.environ['GITHUB_TOKEN']
from prefect.blocks.system import Secret

GITHUB_TOKEN = Secret.load("collection-registry-contents-prs-rw-pat").get()
SOURCE_REPO_URL = 'https://raw.githubusercontent.com/PrefectHQ/prefect-collection-registry/main/views/aggregate-worker-metadata.json'
TARGET_FILE_PATH = 'src/prefect/server/api/collections_data/views/aggregate-worker-metadata.json' # noqa E501
TARGET_ORG = 'PrefectHQ'
Expand Down

0 comments on commit 4f08400

Please sign in to comment.