Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add GH to PR metadata views to core #335

Merged
merged 23 commits into from
Jan 8, 2024
Merged
Changes from 21 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
38 changes: 38 additions & 0 deletions .github/workflows/pr_views_to_core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: PR Views to PrefectHQ/prefect

on:
push:
branches:
- main
paths:
- "views/aggregate-worker-metadata.json"
workflow_dispatch:
cicdw marked this conversation as resolved.
Show resolved Hide resolved

env:
GITHUB_TOKEN: ${{ secrets.PREFECT_COLLECTION_REGISTRY_PRS_RW }}
jamiezieziula marked this conversation as resolved.
Show resolved Hide resolved

jobs:
update-views:
name: Send updated views to PrefectHQ/prefect
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Open PRs to PrefectHQ/prefect
run: |
NEW_BRANCH="update-worker-metadata-$(date +%Y%m%d%H%M%S)"
TARGET_FILE_PATH="src/prefect/server/api/collections_data/views/aggregate-worker-metadata.json"
SOURCE_REPO_URL="https://raw.githubusercontent.com/PrefectHQ/prefect-collection-registry/main/views/aggregate-worker-metadata.json"

git clone https://github.com/PrefectHQ/prefect.git
cd prefect

mkdir -p $(dirname $TARGET_FILE_PATH)
cicdw marked this conversation as resolved.
Show resolved Hide resolved
curl -o $TARGET_FILE_PATH $SOURCE_REPO_URL

git checkout -b $NEW_BRANCH
git add $TARGET_FILE_PATH
git commit -m "Update aggregate-worker-metadata.json"
git push --set-upstream origin $NEW_BRANCH

gh pr create --repo PrefectHQ/prefect --base main --head $NEW_BRANCH --title "Automated PR for Worker Metadata Update" --body "This is an automated PR to update the worker metadata."