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

Fix manual release/dispatch workflows #2230

Merged
merged 10 commits into from
May 30, 2023
2 changes: 2 additions & 0 deletions .github/workflows/manual_adhoc_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
MARK_TAGGED_VERSION: false
ADHOC_NAME: ${{ github.event.inputs.ADHOC_NAME }}
RRD_ARTIFACT_NAME: linux-rrd-fast
UPLOAD_COMMIT: false
secrets: inherit

build-web-demo-adhoc:
Expand All @@ -65,4 +66,5 @@ jobs:
MARK_PRERELEASE_FOR_MAINLINE: false
MARK_TAGGED_VERSION: false
ADHOC_NAME: ${{ github.event.inputs.ADHOC_NAME }}
UPLOAD_COMMIT: false
secrets: inherit
20 changes: 20 additions & 0 deletions .github/workflows/manual_build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,26 @@ jobs:
RRD_ARTIFACT_NAME: linux-rrd
RELEASE_VERSION: ${{ github.event.inputs.RELEASE_VERSION }}
secrets: inherit

build-web-demo:
name: 'Build Web Demo'
needs: [build-linux, build-web]
uses: ./.github/workflows/reusable_build_web_demo.yml
with:
CONCURRENCY: manual-dispatch-${{ github.run_id}}
WHEEL_ARTIFACT_NAME: linux-wheel
secrets: inherit

upload-web-demo:
name: 'Upload Web'
needs: [build-web-demo]
uses: ./.github/workflows/reusable_upload_web_demo.yml
with:
CONCURRENCY: manual-dispatch-${{ github.run_id}}
MARK_PRERELEASE_FOR_MAINLINE: false
MARK_TAGGED_VERSION: true
RELEASE_VERSION: ${{ github.event.inputs.RELEASE_VERSION }}
secrets: inherit

generate-wheel-index:
name: 'Generate Pip Index'
Expand Down
20 changes: 7 additions & 13 deletions .github/workflows/manual_dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,10 @@ on:
default: 'linux'

BUILD_WEB:
description: 'Run reusable_build_web'
type: boolean
required: false
default: true

BUILD_WEB_DEMO:
description: 'Run reusable_build_web'
type: boolean
description: 'Run reusable_build_web/reusable_build_web_demo (Full build: app,demo)'
type: string
required: false
default: true
default: 'app,demo'

RELEASE_VERSION:
description: 'Release Version Number (Must match Cargo.toml)'
Expand Down Expand Up @@ -218,7 +212,7 @@ jobs:

build-web:
name: 'Build Web'
if: ${{ github.event.inputs.BUILD_WEB == 'true'}}
if: ${{ contains(github.event.inputs.BUILD_WEB, 'app') }}
uses: ./.github/workflows/reusable_build_web.yml
with:
CONCURRENCY: manual-dispatch-${{ github.run_id}}
Expand All @@ -228,7 +222,7 @@ jobs:
upload-web:
name: 'Upload Web'
needs: [min-test-wheel, build-web]
if: ${{ (github.event.inputs.BUILD_WEB == 'true') && (github.event.inputs.UPLOAD_GCLOUD == 'true') }}
if: ${{ contains(github.event.inputs.BUILD_WEB, 'app') && (github.event.inputs.UPLOAD_GCLOUD == 'true') }}
uses: ./.github/workflows/reusable_upload_web.yml
with:
CONCURRENCY: manual-dispatch-${{ github.run_id}}
Expand All @@ -240,7 +234,7 @@ jobs:
build-web-demo:
name: 'Build Web Demo'
needs: [min-test-wheel, build-web]
if: ${{ github.event.inputs.BUILD_WEB_DEMO == 'true'}}
if: ${{ contains(github.event.inputs.BUILD_WEB, 'demo') }}
uses: ./.github/workflows/reusable_build_web_demo.yml
with:
CONCURRENCY: manual-dispatch-${{ github.run_id}}
Expand All @@ -250,7 +244,7 @@ jobs:
upload-web-demo:
name: 'Upload Web Demo'
needs: [build-web-demo]
if: ${{ (github.event.inputs.BUILD_WEB_DEMO == 'true') && (github.event.inputs.UPLOAD_GCLOUD == 'true') }}
if: ${{ contains(github.event.inputs.BUILD_WEB, 'demo') && (github.event.inputs.UPLOAD_GCLOUD == 'true') }}
uses: ./.github/workflows/reusable_upload_web_demo.yml
with:
CONCURRENCY: manual-dispatch-${{ github.run_id}}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/manual_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,8 @@ jobs:
generateReleaseNotes: true
allowUpdates: true
draft: true

- name: Release Web Demo
run: |
gsutil -m cp -r "gs://rerun-demo/commit/${{ env.SHORT_SHA }}/*" "gs://rerun-demo/version/latest/"

2 changes: 1 addition & 1 deletion .github/workflows/on_push_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
secrets: inherit

upload-web-demo:
name: 'Upload Web'
name: 'Upload Web Demo'
needs: [build-web-demo]
uses: ./.github/workflows/reusable_upload_web_demo.yml
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/reusable_upload_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ on:
required: false
type: string
default: ''
UPLOAD_COMMIT:
required: false
type: boolean
default: true

concurrency:
group: ${{ inputs.CONCURRENCY }}-upload-web
Expand Down Expand Up @@ -80,13 +84,15 @@ jobs:
echo "SHORT_SHA=$(echo $USED_SHA | cut -c1-7)" >> $GITHUB_ENV

- name: "Upload web-viewer (commit)"
if: ${{ inputs.UPLOAD_COMMIT }}
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "web_viewer"
destination: "rerun-web-viewer/commit/${{env.SHORT_SHA}}"
parent: false

- name: "Upload RRD (commit)"
if: ${{ inputs.UPLOAD_COMMIT }}
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "rrd"
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/reusable_upload_web_demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ on:
required: false
type: string
default: ''
UPLOAD_COMMIT:
required: false
type: boolean
default: true

concurrency:
group: ${{ inputs.CONCURRENCY }}-upload-web-demo
Expand Down Expand Up @@ -69,6 +73,7 @@ jobs:
echo "SHORT_SHA=$(echo $USED_SHA | cut -c1-7)" >> $GITHUB_ENV

- name: "Upload web demo (commit)"
if: ${{ inputs.UPLOAD_COMMIT }}
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "web_demo"
Expand All @@ -90,14 +95,6 @@ jobs:
path: "web_demo"
destination: "rerun-demo/version/${{inputs.RELEASE_VERSION}}"
parent: false

- name: "Upload web demo (latest)"
if: inputs.MARK_TAGGED_VERSION
uses: google-github-actions/upload-cloud-storage@v1
with:
path: "web_demo"
destination: "rerun-demo/version/latest"
parent: false

- name: "Upload web demo (adhoc)"
if: ${{ inputs.ADHOC_NAME != '' }}
Expand Down