From 7b70e30d9c6a55528b03ba9b3ed6f4ada6095954 Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Fri, 9 Aug 2024 14:07:35 +0200 Subject: [PATCH 01/87] Add custom landing and pipeline --- .github/workflows/build.yml | 17 +++ .github/workflows/ci-conversion-webhook.yml | 34 ------ .github/workflows/ci-landing-page.yml | 34 ------ .github/workflows/ci-maven-common.yml | 25 ---- .github/workflows/ci-maven-conf.yml | 25 ---- .github/workflows/ci-maven-operator.yml | 28 ----- .github/workflows/ci-maven-service.yml | 27 ----- .github/workflows/ci-monitor-theia.yml | 30 ----- .github/workflows/ci-node-common.yml | 30 ----- .github/workflows/ci-operator.yml | 34 ------ .github/workflows/ci-service.yml | 34 ------ .github/workflows/ci-wondershaper.yml | 30 ----- .github/workflows/publish-demos.yml | 80 ------------- .github/workflows/reusable-demo.yml | 71 ------------ .github/workflows/reusable-docker.yml | 105 ----------------- .github/workflows/reusable-maven.yml | 121 -------------------- .github/workflows/reusable-npm.yml | 83 -------------- .github/workflows/stale.yml | 22 ---- node/landing-page/src/App.tsx | 8 +- node/landing-page/src/components/Footer.tsx | 34 +----- 20 files changed, 26 insertions(+), 846 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/ci-conversion-webhook.yml delete mode 100644 .github/workflows/ci-landing-page.yml delete mode 100644 .github/workflows/ci-maven-common.yml delete mode 100644 .github/workflows/ci-maven-conf.yml delete mode 100644 .github/workflows/ci-maven-operator.yml delete mode 100644 .github/workflows/ci-maven-service.yml delete mode 100644 .github/workflows/ci-monitor-theia.yml delete mode 100644 .github/workflows/ci-node-common.yml delete mode 100644 .github/workflows/ci-operator.yml delete mode 100644 .github/workflows/ci-service.yml delete mode 100644 .github/workflows/ci-wondershaper.yml delete mode 100644 .github/workflows/publish-demos.yml delete mode 100644 .github/workflows/reusable-demo.yml delete mode 100644 .github/workflows/reusable-docker.yml delete mode 100644 .github/workflows/reusable-maven.yml delete mode 100644 .github/workflows/reusable-npm.yml delete mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..f8d960b86 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,17 @@ +on: + pull_request: + branches: + - main + push: + branches: + - main + +jobs: + build-and-push-base: + uses: ls1intum/.github/.github/workflows/build-and-push-docker-image.yml@feat/include-label-for-docker-images + with: + docker-file: dockerfiles/landing-page/Dockerfile + image-name: ghcr.io/ls1intum/theia/landing-page + docker-context: . + tags: "2024-08-09" + secrets: inherit diff --git a/.github/workflows/ci-conversion-webhook.yml b/.github/workflows/ci-conversion-webhook.yml deleted file mode 100644 index 36347acbc..000000000 --- a/.github/workflows/ci-conversion-webhook.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: "[DOCKER] conversion-webhook" - -on: - push: - branches: - - main - paths: - - "java/common/**" - - "java/conversion/**" - - "dockerfiles/conversion-webhook/**" - # Publish when a workflow has changed (this is needed to detect version updates) - - ".github/workflows/ci-conversion-webhook.yml" - - ".github/workflows/reusable-docker.yml" - pull_request: - branches: - - main - paths: - - "java/common/**" - - "java/conversion/**" - - "dockerfiles/conversion-webhook/**" - release: - types: - - published - -jobs: - run: - uses: ./.github/workflows/reusable-docker.yml - with: - docker_org: theiacloud - docker_image: theia-cloud-conversion-webhook - docker_file: dockerfiles/conversion-webhook/Dockerfile - secrets: - dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} - dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/ci-landing-page.yml b/.github/workflows/ci-landing-page.yml deleted file mode 100644 index 902f567bb..000000000 --- a/.github/workflows/ci-landing-page.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: "[DOCKER] landing-page" - -on: - push: - branches: - - main - paths: - - "node/common/**" - - "node/landing-page/**" - - "dockerfiles/landing-page/**" - # Publish when a workflow has changed (this is needed to detect version updates) - - ".github/workflows/ci-landing-page.yml" - - ".github/workflows/reusable-docker.yml" - pull_request: - branches: - - main - paths: - - "node/common/**" - - "node/landing-page/**" - - "dockerfiles/landing-page/**" - release: - types: - - published - -jobs: - run: - uses: ./.github/workflows/reusable-docker.yml - with: - docker_org: theiacloud - docker_image: theia-cloud-landing-page - docker_file: dockerfiles/landing-page/Dockerfile - secrets: - dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} - dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/ci-maven-common.yml b/.github/workflows/ci-maven-common.yml deleted file mode 100644 index 1d743bf62..000000000 --- a/.github/workflows/ci-maven-common.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: "[MAVEN] common" - -on: - push: - branches: - - main - paths: - - "java/common/**" - pull_request: - branches: - - main - paths: - - "java/common/**" - release: - types: - - published - -jobs: - run: - permissions: - packages: write - uses: ./.github/workflows/reusable-maven.yml - with: - path_to_package: common/org.eclipse.theia.cloud.common/ - secrets: inherit diff --git a/.github/workflows/ci-maven-conf.yml b/.github/workflows/ci-maven-conf.yml deleted file mode 100644 index 3596557ac..000000000 --- a/.github/workflows/ci-maven-conf.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: "[MAVEN] maven-conf" - -on: - push: - branches: - - main - paths: - - "java/common/maven-conf/**" - pull_request: - branches: - - main - paths: - - "java/common/maven-conf/**" - release: - types: - - published - -jobs: - run: - permissions: - packages: write - uses: ./.github/workflows/reusable-maven.yml - with: - path_to_package: common/maven-conf/ - secrets: inherit diff --git a/.github/workflows/ci-maven-operator.yml b/.github/workflows/ci-maven-operator.yml deleted file mode 100644 index 94fe211fc..000000000 --- a/.github/workflows/ci-maven-operator.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: "[MAVEN] operator" - -on: - push: - branches: - - main - paths: - - "java/common/**" - - "java/operator/org.eclipse.theia.cloud.operator/**" - pull_request: - branches: - - main - paths: - - "java/common/**" - - "java/operator/org.eclipse.theia.cloud.operator/**" - release: - types: - - published - -jobs: - run: - permissions: - packages: write - uses: ./.github/workflows/reusable-maven.yml - with: - path_to_package: operator/org.eclipse.theia.cloud.operator/ - dependencies: common/maven-conf/,common/org.eclipse.theia.cloud.common/ - secrets: inherit diff --git a/.github/workflows/ci-maven-service.yml b/.github/workflows/ci-maven-service.yml deleted file mode 100644 index 67b13ea76..000000000 --- a/.github/workflows/ci-maven-service.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: "[MAVEN] service" -on: - push: - branches: - - main - paths: - - "java/common/**" - - "java/service/org.eclipse.theia.cloud.service/**" - pull_request: - branches: - - main - paths: - - "java/common/**" - - "java/service/org.eclipse.theia.cloud.service/**" - release: - types: - - published - -jobs: - run: - permissions: - packages: write - uses: ./.github/workflows/reusable-maven.yml - with: - path_to_package: service/org.eclipse.theia.cloud.service/ - dependencies: common/maven-conf/,common/org.eclipse.theia.cloud.common/ - secrets: inherit diff --git a/.github/workflows/ci-monitor-theia.yml b/.github/workflows/ci-monitor-theia.yml deleted file mode 100644 index c1c11e63e..000000000 --- a/.github/workflows/ci-monitor-theia.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: "[NPM] monitor-theia" - -on: - push: - branches: - - main - paths: - - "node/monitor-theia/**" - # Publish when a workflow has changed (this is needed to detect version updates) - - ".github/workflows/ci-monitor-theia.yml" - - ".github/workflows/reusable-npm.yml" - pull_request: - branches: - - main - paths: - - "node/monitor-theia/**" - release: - types: - - published - -jobs: - run: - uses: ./.github/workflows/reusable-npm.yml - permissions: - contents: read - id-token: write - with: - package_workspace: monitor-theia - secrets: - npm-token: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/ci-node-common.yml b/.github/workflows/ci-node-common.yml deleted file mode 100644 index 5ab95a4f4..000000000 --- a/.github/workflows/ci-node-common.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: "[NPM] common" - -on: - push: - branches: - - main - paths: - - "node/common/**" - # Publish when a workflow has changed (this is needed to detect version updates) - - ".github/workflows/ci-node-common.yml" - - ".github/workflows/reusable-npm.yml" - pull_request: - branches: - - main - paths: - - "node/common/**" - release: - types: - - published - -jobs: - run: - uses: ./.github/workflows/reusable-npm.yml - permissions: - contents: read - id-token: write - with: - package_workspace: common - secrets: - npm-token: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/ci-operator.yml b/.github/workflows/ci-operator.yml deleted file mode 100644 index 8dbf82e32..000000000 --- a/.github/workflows/ci-operator.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: "[DOCKER] operator" - -on: - push: - branches: - - main - paths: - - "java/common/**" - - "java/operator/**" - - "dockerfiles/operator/**" - # Publish when a workflow has changed (this is needed to detect version updates) - - ".github/workflows/ci-operator.yml" - - ".github/workflows/reusable-docker.yml" - pull_request: - branches: - - main - paths: - - "java/common/**" - - "java/operator/**" - - "dockerfiles/operator/**" - release: - types: - - published - -jobs: - run: - uses: ./.github/workflows/reusable-docker.yml - with: - docker_org: theiacloud - docker_image: theia-cloud-operator - docker_file: dockerfiles/operator/Dockerfile - secrets: - dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} - dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/ci-service.yml b/.github/workflows/ci-service.yml deleted file mode 100644 index 317803680..000000000 --- a/.github/workflows/ci-service.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: "[DOCKER] service" - -on: - push: - branches: - - main - paths: - - "java/common/**" - - "java/service/**" - - "dockerfiles/service/**" - # Publish when a workflow has changed (this is needed to detect version updates) - - ".github/workflows/ci-service.yml" - - ".github/workflows/reusable-docker.yml" - pull_request: - branches: - - main - paths: - - "java/common/**" - - "java/service/**" - - "dockerfiles/service/**" - release: - types: - - published - -jobs: - run: - uses: ./.github/workflows/reusable-docker.yml - with: - docker_org: theiacloud - docker_image: theia-cloud-service - docker_file: dockerfiles/service/Dockerfile - secrets: - dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} - dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/ci-wondershaper.yml b/.github/workflows/ci-wondershaper.yml deleted file mode 100644 index 8bd725bf1..000000000 --- a/.github/workflows/ci-wondershaper.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: "[DOCKER] wondershaper" - -on: - push: - branches: - - main - paths: - - "dockerfiles/wondershaper/**" - # Publish when a workflow has changed (this is needed to detect version updates) - - ".github/workflows/ci-wondershaper.yml" - - ".github/workflows/reusable-docker.yml" - pull_request: - branches: - - main - paths: - - "dockerfiles/wondershaper/**" - release: - types: - - published - -jobs: - run: - uses: ./.github/workflows/reusable-docker.yml - with: - docker_org: theiacloud - docker_image: theia-cloud-wondershaper - docker_file: dockerfiles/wondershaper/Dockerfile - secrets: - dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} - dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/publish-demos.yml b/.github/workflows/publish-demos.yml deleted file mode 100644 index 86cbd8192..000000000 --- a/.github/workflows/publish-demos.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: "[DOCKER] demos" - -on: - workflow_dispatch: - inputs: - publish_theia_cloud_demo: - description: "Publish theia-cloud-demo?" - type: boolean - required: true - publish_theia_cloud_activity_demo_theia: - description: "Publish theia-cloud-activity-demo-theia?" - type: boolean - required: true - publish_theia_cloud_activity_demo: - description: "Publishtheia-cloud-activity-demo?" - type: boolean - required: true - -env: - VERSION: 0.12.0-next - -jobs: - check-version: - runs-on: ubuntu-latest - outputs: - is_next_version: ${{ steps.version_check.outputs.is_next_version }} - version: ${{ env.VERSION }} - steps: - - id: version_check - run: | - if [[ $VERSION == *"-next" ]]; then - echo "is_next_version=true" >> $GITHUB_OUTPUT - else - echo "is_next_version=false" >> $GITHUB_OUTPUT - fi - - publish-theia-cloud-demo: - if: inputs.publish_theia_cloud_demo == true - needs: check-version - uses: ./.github/workflows/reusable-demo.yml - with: - docker_org: theiacloud - docker_image: theia-cloud-demo - docker_file: demo/dockerfiles/demo-theia-docker/Dockerfile - docker_location: demo/dockerfiles/demo-theia-docker/. - publish_next: ${{ needs.check-version.outputs.is_next_version }} - version: ${{ needs.check-version.outputs.version }} - secrets: - dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} - dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} - - publish-theia-cloud-activity-demo-theia: - if: inputs.publish_theia_cloud_activity_demo_theia == true - needs: check-version - uses: ./.github/workflows/reusable-demo.yml - with: - docker_org: theiacloud - docker_image: theia-cloud-activity-demo-theia - docker_file: demo/dockerfiles/demo-theia-monitor-theia/Dockerfile - docker_location: . - publish_next: ${{ needs.check-version.outputs.is_next_version }} - version: ${{ needs.check-version.outputs.version }} - secrets: - dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} - dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} - - publish-theia-cloud-activity-demo: - if: inputs.publish_theia_cloud_activity_demo == true - needs: [check-version, publish-theia-cloud-demo] - uses: ./.github/workflows/reusable-demo.yml - with: - docker_org: theiacloud - docker_image: theia-cloud-activity-demo - docker_file: demo/dockerfiles/demo-theia-monitor-vscode/Dockerfile - docker_location: demo/dockerfiles/demo-theia-monitor-vscode/. - publish_next: ${{ needs.check-version.outputs.is_next_version }} - version: ${{ needs.check-version.outputs.version }} - secrets: - dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} - dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/reusable-demo.yml b/.github/workflows/reusable-demo.yml deleted file mode 100644 index a48c17852..000000000 --- a/.github/workflows/reusable-demo.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Reusable workflow for demo applications - -on: - workflow_call: - inputs: - docker_org: - required: true - type: string - docker_image: - required: true - type: string - docker_file: - required: true - type: string - docker_location: - required: true - type: string - publish_next: - required: true - type: string - version: - required: true - type: string - secrets: - dockerhub_username: - required: true - dockerhub_token: - required: true - -jobs: - publish: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Create docker tags - id: get_tags - run: | - echo "version_tag=${{ inputs.docker_org }}/${{ inputs.docker_image }}:${{ inputs.version }}" >> $GITHUB_OUTPUT - echo "next_sha_tag=${{ inputs.docker_org }}/${{ inputs.docker_image }}:${{ inputs.version }}.$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT - echo "next_tag_for_release=${{ inputs.docker_org }}/${{ inputs.docker_image }}:${{ inputs.version }}-next" >> $GITHUB_OUTPUT - echo "latest_tag=${{ inputs.docker_org }}/${{ inputs.docker_image }}:latest" >> $GITHUB_OUTPUT - - - name: Build Docker image - run: docker build -t ${{ steps.get_tags.outputs.version_tag }} -f ${{ inputs.docker_file }} ${{ inputs.docker_location }} - - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.dockerhub_username }} - password: ${{ secrets.dockerhub_token }} - - # Push version and SHA tag (for next versions) - - name: Push version and SHA tag - if: inputs.publish_next == 'true' - run: | - docker push ${{ steps.get_tags.outputs.version_tag }} - docker tag ${{ steps.get_tags.outputs.version_tag }} ${{ steps.get_tags.outputs.next_sha_tag }} - docker push ${{ steps.get_tags.outputs.next_sha_tag }} - - # Push version, next and latest tag for releases (for valid semver versions) - - name: Push version and latest tag - if: inputs.publish_next == 'false' - run: | - docker push ${{ steps.get_tags.outputs.version_tag }} - docker tag ${{ steps.get_tags.outputs.version_tag }} ${{ steps.get_tags.outputs.latest_tag }} - docker push ${{ steps.get_tags.outputs.latest_tag }} - docker tag ${{ steps.get_tags.outputs.version_tag }} ${{ steps.get_tags.outputs.next_tag_for_release }} - docker push ${{ steps.get_tags.outputs.next_tag_for_release }} diff --git a/.github/workflows/reusable-docker.yml b/.github/workflows/reusable-docker.yml deleted file mode 100644 index 56a615da8..000000000 --- a/.github/workflows/reusable-docker.yml +++ /dev/null @@ -1,105 +0,0 @@ -name: Reusable workflow for docker images - -on: - workflow_call: - inputs: - docker_org: - required: true - type: string - docker_image: - required: true - type: string - docker_file: - required: true - type: string - secrets: - dockerhub_username: - required: true - dockerhub_token: - required: true - -env: - VERSION: 0.12.0-next - -jobs: - build: - runs-on: ubuntu-latest - if: github.event_name == 'pull_request' - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Create docker tags - id: get_tags - run: | - echo "version_tag=${{ inputs.docker_org }}/${{ inputs.docker_image }}:${{ env.VERSION }}" >> $GITHUB_OUTPUT - - - name: Build the Docker image - run: | - docker build -t ${{ steps.get_tags.outputs.version_tag }} -f ${{ inputs.docker_file }} . - - publish: - runs-on: ubuntu-latest - if: github.event_name == 'push' || github.event_name == 'release' - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - # Check if we have a valid *-next version for merges on main - - name: Check version (only for push events) - if: github.event_name == 'push' - id: version_check - run: | - if [[ $VERSION == *"-next" ]]; then - echo "is_next_version=true" >> $GITHUB_OUTPUT - else - echo "is_next_version=false" >> $GITHUB_OUTPUT - fi - - # Create tags according to the state to be published: - # - next version on main merge: create `*-next` and `*-next.` tags - # - release version: create version, `*-next` and `latest` tags - - name: Create docker tags - id: get_tags - if: github.event_name == 'push' && steps.version_check.outputs.is_next_version == 'true' || github.event_name == 'release' - run: | - if [[ $GITHUB_EVENT_NAME == 'push' ]]; then - echo "sha_tag=${{ inputs.docker_org }}/${{ inputs.docker_image }}:${{ env.VERSION }}.$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT - echo "version_tag=${{ inputs.docker_org }}/${{ inputs.docker_image }}:${{ env.VERSION }}" >> $GITHUB_OUTPUT - else - echo "version_tag=${{ inputs.docker_org }}/${{ inputs.docker_image }}:${{ env.VERSION }}" >> $GITHUB_OUTPUT - echo "next_tag=${{ inputs.docker_org }}/${{ inputs.docker_image }}:${{ env.VERSION }}-next" >> $GITHUB_OUTPUT - echo "latest_tag=${{ inputs.docker_org }}/${{ inputs.docker_image }}:latest" >> $GITHUB_OUTPUT - fi - - # Only build when we will publish, so either a main merge with next-version or a release - - name: Build Docker image - if: github.event_name == 'push' && steps.version_check.outputs.is_next_version == 'true' || github.event_name == 'release' - run: docker build -t ${{ steps.get_tags.outputs.version_tag }} -f ${{ inputs.docker_file }} . - - # Only log in to dockerhub when we will publish, so either a main merge with next-version or a release - - name: Login to DockerHub - if: github.event_name == 'push' && steps.version_check.outputs.is_next_version == 'true' || github.event_name == 'release' - uses: docker/login-action@v3 - with: - username: ${{ secrets.dockerhub_username }} - password: ${{ secrets.dockerhub_token }} - - # Push for main merges with next version - - name: Push Docker tags (for push events with next version) - if: github.event_name == 'push' && steps.version_check.outputs.is_next_version == 'true' - run: | - docker push ${{ steps.get_tags.outputs.version_tag }} - docker tag ${{ steps.get_tags.outputs.version_tag }} ${{ steps.get_tags.outputs.sha_tag }} - docker push ${{ steps.get_tags.outputs.sha_tag }} - - # Push for releases - - name: Push Docker tags (for release events) - if: github.event_name == 'release' - run: | - docker push ${{ steps.get_tags.outputs.version_tag }} - docker tag ${{ steps.get_tags.outputs.version_tag }} ${{ steps.get_tags.outputs.latest_tag }} - docker push ${{ steps.get_tags.outputs.latest_tag }} - docker tag ${{ steps.get_tags.outputs.version_tag }} ${{ steps.get_tags.outputs.next_tag }} - docker push ${{ steps.get_tags.outputs.next_tag }} diff --git a/.github/workflows/reusable-maven.yml b/.github/workflows/reusable-maven.yml deleted file mode 100644 index 512f35737..000000000 --- a/.github/workflows/reusable-maven.yml +++ /dev/null @@ -1,121 +0,0 @@ -name: Reusable workflow for maven packages - -on: - workflow_call: - inputs: - path_to_package: - required: true - type: string - dependencies: - description: "List of paths to dependencies. Entries are relative to the java directory and separated by comma (no whitespaces)." - required: false - type: string - -defaults: - run: - working-directory: java - -jobs: - build: - runs-on: ubuntu-latest - if: github.event_name == 'pull_request' - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: "17" - distribution: "temurin" - - - name: Build dependencies - if: ${{ inputs.dependencies != '' }} - run: | - IFS=',' read -r -a dirs <<< "${{ inputs.dependencies }}" - for dir in "${dirs[@]}" - do - cd "$dir" - mvn clean install --no-transfer-progress - cd - - done - - - name: Verify package - run: | - cd ${{ inputs.path_to_package }} - mvn verify -fae --no-transfer-progress - - publish: - runs-on: ubuntu-latest - if: github.event_name == 'push' || github.event_name == 'release' - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Run Version Check - id: version_check - run: | - cd ${{ inputs.path_to_package }} - VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) - if [[ "$VERSION" == *-SNAPSHOT ]]; then - echo "is_snapshot_version=true" >> $GITHUB_OUTPUT - else - echo "is_snapshot_version=false" >> $GITHUB_OUTPUT - fi - - # Only continue from here when the version matches the event, so either: - # - main merge with snapshot version - # - release with proper version - - name: Set up JDK 17 - if: | - (github.event_name == 'push' && steps.version_check.outputs.is_snapshot_version == 'true') || - (github.event_name == 'release' && steps.version_check.outputs.is_snapshot_version == 'false') - uses: actions/setup-java@v4 - with: - java-version: "17" - distribution: "temurin" - - - name: Build dependencies - if: | - ${{ inputs.dependencies != '' }} && - ( - (github.event_name == 'push' && steps.version_check.outputs.is_snapshot_version == 'true') || - (github.event_name == 'release' && steps.version_check.outputs.is_snapshot_version == 'false') - ) - run: | - IFS=',' read -r -a dirs <<< "${{ inputs.dependencies }}" - for dir in "${dirs[@]}" - do - cd "$dir" - mvn clean install --no-transfer-progress - cd - - done - - - name: Publish package to GitHub Packages - if: | - (github.event_name == 'push' && steps.version_check.outputs.is_snapshot_version == 'true') || - (github.event_name == 'release' && steps.version_check.outputs.is_snapshot_version == 'false') - run: | - cd ${{ inputs.path_to_package }} - mvn --batch-mode deploy - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Authenticate to Google Cloud - if: | - (github.event_name == 'push' && steps.version_check.outputs.is_snapshot_version == 'true') || - (github.event_name == 'release' && steps.version_check.outputs.is_snapshot_version == 'false') - uses: google-github-actions/auth@v2 - with: - credentials_json: "${{ secrets.GCP_SA_KEY }}" - - - name: Publish package to Google Artifact Registry - if: | - (github.event_name == 'push' && steps.version_check.outputs.is_snapshot_version == 'true') || - (github.event_name == 'release' && steps.version_check.outputs.is_snapshot_version == 'false') - run: | - cd ${{ inputs.path_to_package }} - mvn --batch-mode deploy -Partifact-registry - env: - GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }} diff --git a/.github/workflows/reusable-npm.yml b/.github/workflows/reusable-npm.yml deleted file mode 100644 index c5e300bec..000000000 --- a/.github/workflows/reusable-npm.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Reusable workflow for npm packages - -on: - workflow_call: - inputs: - package_workspace: - required: true - type: string - description: The package's workspace path relative to the node directory. - secrets: - npm-token: - required: true - -permissions: - contents: read - id-token: write - -jobs: - build: - runs-on: ubuntu-latest - if: github.event_name == 'pull_request' - defaults: - run: - working-directory: ./node - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Install dependencies - run: npm ci - - - name: Build package - run: npm run build -w ${{ inputs.package_workspace }} - - publish: - runs-on: ubuntu-latest - if: github.event_name == 'push' || github.event_name == 'release' - defaults: - run: - working-directory: ./node - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Check version (only for push events) - if: github.event_name == 'push' - id: version_check - run: | - VERSION=$(cd ${{ inputs.package_workspace }} && node --print "require('./package.json').version") - echo "Package version: ${VERSION}" - if [[ $VERSION == *"-next" ]]; then - echo "is_next_version=true" >> $GITHUB_OUTPUT - else - echo "is_next_version=false" >> $GITHUB_OUTPUT - fi - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - registry-url: "https://registry.npmjs.org" - - - name: Install dependencies - run: npm ci - - - name: Publish next version - if: github.event_name == 'push' && steps.version_check.outputs.is_next_version == 'true' - run: npm run publish:next -w ${{ inputs.package_workspace }} - env: - NODE_AUTH_TOKEN: ${{ secrets.npm-token }} - NPM_CONFIG_PROVENANCE: true - - - name: Publish latest version - if: github.event_name == 'release' - run: npm run publish:latest -w ${{ inputs.package_workspace }} - env: - NODE_AUTH_TOKEN: ${{ secrets.npm-token }} - NPM_CONFIG_PROVENANCE: true diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index ec563894f..000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Close inactive issues -on: - schedule: - - cron: "30 9 * * *" - -jobs: - close-issues: - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - steps: - - uses: actions/stale@v6.0.1 - with: - days-before-stale: 180 - days-before-close: 14 - stale-issue-label: "stale" - stale-issue-message: "This issue is stale because it has been open for 180 days with no activity." - close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale." - stale-pr-message: "This PR is stale because it has been open 180 days with no activity." - close-pr-message: "This PR was closed because it has been inactive for 14 days since being marked as stale." - repo-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/node/landing-page/src/App.tsx b/node/landing-page/src/App.tsx index 83de9e265..7d01d3805 100644 --- a/node/landing-page/src/App.tsx +++ b/node/landing-page/src/App.tsx @@ -104,6 +104,11 @@ function App(): JSX.Element { console.error('Authentication Failed'); }); } + + // Try to start the app if the app definition is set + if (selectedAppDefinition) { + handleStartSession(selectedAppDefinition); + } } // eslint-disable-next-line react-hooks/exhaustive-deps }, []); @@ -221,10 +226,7 @@ function App(): JSX.Element { )}