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

Chore/allow single packages updated and add prefect-ui-library #10

Merged
merged 3 commits into from
Mar 14, 2024
Merged
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
32 changes: 28 additions & 4 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,21 @@ inputs:
PREFECT_OSS_ACTIONS_RW_TOKEN:
description: The Github token to use for triggering the Prefect OSS NPM package update.
required: false
UPDATE_DOWNSTREAM_REPOS:
description: Whether to trigger the Nebula UI and Prefect OSS NPM package updates.
PREFECT_UI_LIBRARY_ACTIONS_RW_TOKEN:
znicholasbrown marked this conversation as resolved.
Show resolved Hide resolved
description: The Github token to use for triggering the Prefect UI Library NPM package update.
required: false
UPDATE_DOWNSTREAM_NEBULA_UI_REPO:
description: Whether to trigger Nebula UI NPM package updates.
required: false
default: "true"
UPDATE_DOWNSTREAM_OSS_REPO:
description: Whether to trigger Prefect OSS NPM package updates.
required: false
default: "true"
UPDATE_DOWNSTREAM_PREFECT_UI_LIBRARY_REPO:
description: Whether to trigger Prefect UI Library NPM package updates.
required: false
default: "false"
runs:
using: composite
steps:
Expand Down Expand Up @@ -60,7 +71,7 @@ runs:
GITHUB_TOKEN: ${{ inputs.NEBULA_UI_ACTIONS_RW_TOKEN }}
tag: ${{ steps.publish.outputs.version }}
run: |
if ${{ inputs.UPDATE_DOWNSTREAM_REPOS == 'true' }} && ${{ steps.publish.outputs.type }}; then
if ${{ inputs.UPDATE_DOWNSTREAM_NEBULA_UI_REPO == 'true' }} && ${{ steps.publish.outputs.type }}; then
gh workflow run npm_update_latest_prefect.yaml \
--repo=prefecthq/nebula-ui \
--ref=main \
Expand All @@ -74,11 +85,24 @@ runs:
GITHUB_TOKEN: ${{ inputs.PREFECT_OSS_ACTIONS_RW_TOKEN }}
tag: ${{ steps.publish.outputs.version }}
run: |
if ${{ inputs.UPDATE_DOWNSTREAM_REPOS == 'true' }} && ${{ steps.publish.outputs.type }}; then
if ${{ inputs.UPDATE_DOWNSTREAM_OSS_REPO == 'true' }} && ${{ steps.publish.outputs.type }}; then
gh workflow run npm_update_latest_prefect.yaml \
--repo=prefecthq/prefect \
--ref=main \
-f package_name="$(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')" \
-f package_version="$tag"
fi
shell: bash
- name: Trigger Prefect OSS NPM Package Update
env:
GITHUB_TOKEN: ${{ inputs.PREFECT_UI_LIBRARY_ACTIONS_RW_TOKEN }}
tag: ${{ steps.publish.outputs.version }}
run: |
if ${{ inputs.UPDATE_DOWNSTREAM_PREFECT_UI_LIBRARY_REPO == 'true' }} && ${{ steps.publish.outputs.type }}; then
gh workflow run npm_update_latest_prefect.yaml \
--repo=prefecthq/prefect-ui-library \
--ref=main \
-f package_name="$(echo $GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]')" \
-f package_version="$tag"
fi
shell: bash