From 06e1e9b8e792d11a92ede993abf9e94fef8552a8 Mon Sep 17 00:00:00 2001 From: jimid27 Date: Thu, 14 Mar 2024 14:11:44 -0400 Subject: [PATCH 1/3] Separate out release paths --- action.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/action.yaml b/action.yaml index 14d138f..0698b84 100644 --- a/action.yaml +++ b/action.yaml @@ -15,8 +15,12 @@ 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. + UPDATE_DOWNSTREAM_NEBULA_UI_REPOS: + description: Whether to trigger Nebula UI NPM package updates. + required: false + default: "true" + UPDATE_DOWNSTREAM_OSS_REPOS: + description: Whether to trigger Prefect OSS NPM package updates. required: false default: "true" runs: @@ -60,7 +64,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_REPOS == 'true' }} && ${{ steps.publish.outputs.type }}; then gh workflow run npm_update_latest_prefect.yaml \ --repo=prefecthq/nebula-ui \ --ref=main \ @@ -74,7 +78,7 @@ 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_REPOS == 'true' }} && ${{ steps.publish.outputs.type }}; then gh workflow run npm_update_latest_prefect.yaml \ --repo=prefecthq/prefect \ --ref=main \ From 7d083e23729024f4dedb622b172187091ea4f5bb Mon Sep 17 00:00:00 2001 From: jimid27 Date: Thu, 14 Mar 2024 14:46:05 -0400 Subject: [PATCH 2/3] Update prefect ui library --- action.yaml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/action.yaml b/action.yaml index 0698b84..46e4392 100644 --- a/action.yaml +++ b/action.yaml @@ -15,14 +15,18 @@ inputs: PREFECT_OSS_ACTIONS_RW_TOKEN: description: The Github token to use for triggering the Prefect OSS NPM package update. required: false - UPDATE_DOWNSTREAM_NEBULA_UI_REPOS: + UPDATE_DOWNSTREAM_NEBULA_UI_REPO: description: Whether to trigger Nebula UI NPM package updates. required: false default: "true" - UPDATE_DOWNSTREAM_OSS_REPOS: + 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: @@ -64,7 +68,7 @@ runs: GITHUB_TOKEN: ${{ inputs.NEBULA_UI_ACTIONS_RW_TOKEN }} tag: ${{ steps.publish.outputs.version }} run: | - if ${{ inputs.UPDATE_DOWNSTREAM_NEBULA_UI_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 \ @@ -78,7 +82,7 @@ runs: GITHUB_TOKEN: ${{ inputs.PREFECT_OSS_ACTIONS_RW_TOKEN }} tag: ${{ steps.publish.outputs.version }} run: | - if ${{ inputs.UPDATE_DOWNSTREAM_OSS_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 \ @@ -86,3 +90,16 @@ runs: -f package_version="$tag" fi shell: bash + - name: Trigger Prefect OSS NPM Package Update + env: + GITHUB_TOKEN: ${{ inputs.PREFECT_OSS_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 From b80e974f29ce82cece2c00af9b69afaf677ad9c4 Mon Sep 17 00:00:00 2001 From: jimid27 Date: Thu, 14 Mar 2024 14:49:05 -0400 Subject: [PATCH 3/3] Add secret --- action.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/action.yaml b/action.yaml index 46e4392..903b3b1 100644 --- a/action.yaml +++ b/action.yaml @@ -15,6 +15,9 @@ inputs: PREFECT_OSS_ACTIONS_RW_TOKEN: description: The Github token to use for triggering the Prefect OSS NPM package update. required: false + PREFECT_UI_LIBRARY_ACTIONS_RW_TOKEN: + 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 @@ -92,7 +95,7 @@ runs: shell: bash - name: Trigger Prefect OSS NPM Package Update env: - GITHUB_TOKEN: ${{ inputs.PREFECT_OSS_ACTIONS_RW_TOKEN }} + 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