name: Release default cloud test environment on: push: branches: [main] paths: - .dockerignore - deploy/Dockerfile - package.json - package-lock.json - repository-media.json - .gitattributes - src/** - shared/** - gateway/** - tracking/** - studio/** - skills/** - packages/** - templates/** - web/** - mcp-ui/** - library/** - template-library/** - scripts/** - docs/transcripts.md - hyperframes.ts - server.ts - template-library.ts - LICENSE - .github/workflows/ci.yml - .github/workflows/container-images.yml - .github/workflows/deploy-cloud-test.yml - .github/scripts/orbit-publish-cloud-test.mjs - .github/scripts/promote-cloud-test.sh - .github/scripts/notify-cloud-test.mjs workflow_dispatch: {} permissions: {} jobs: checks: if: github.repository == 'nexu-io/openmotion' && github.ref == 'refs/heads/main' permissions: contents: read uses: ./.github/workflows/ci.yml images: if: github.repository == 'nexu-io/openmotion' && github.ref == 'refs/heads/main' permissions: actions: read contents: read packages: write uses: ./.github/workflows/container-images.yml promote: name: Publish tested image digests for Argo CD outputs: receipt: ${{ steps.orbit.outputs.publication_receipt }} published: ${{ steps.orbit.outputs.publication_result || steps.legacy.outputs.publication_result }} environment: orbit-cloud-test needs: [checks, images] if: github.repository == 'nexu-io/openmotion' && github.ref == 'refs/heads/main' runs-on: ubuntu-24.04 timeout-minutes: 20 permissions: contents: write steps: - uses: actions/checkout@v6.0.2 - uses: actions/download-artifact@v8.0.2 with: pattern: test-digest-* merge-multiple: true path: ${{ runner.temp }}/digests - uses: actions/setup-node@v6 with: node-version: '26.11.1' - name: Publish and verify Studio preview media before promotion env: AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_R2_RELEASES_AK }} AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_R2_RELEASES_SK }} AWS_EC2_METADATA_DISABLED: 'true' AWS_PAGER: '' MOTION_R2_ENDPOINT: ${{ vars.CLOUDFLARE_R2_RELEASES_URL }} MOTION_R2_BUCKET: ${{ vars.CLOUDFLARE_R2_RELEASES_BUCKET }} run: node scripts/publish-studio-previews.ts - name: Publish tested image digests to Orbit id: orbit if: vars.ORBIT_OPENMOTION_PULL == 'true' env: ORBIT_API_URL: ${{ vars.ORBIT_API_URL }} ORBIT_OPENMOTION_BUILD_TOKEN: ${{ secrets.ORBIT_OPENMOTION_BUILD_TOKEN }} run: node .github/scripts/orbit-publish-cloud-test.mjs "$RUNNER_TEMP/digests" - name: Advance the default test release id: legacy if: vars.ORBIT_OPENMOTION_PULL != 'true' run: bash .github/scripts/promote-cloud-test.sh "$RUNNER_TEMP/digests" notify: name: Notify the Feishu deployment group needs: [checks, images, promote] if: >- ${{ !cancelled() && github.repository == 'nexu-io/openmotion' && github.ref == 'refs/heads/main' && (failure() || needs.promote.outputs.published != '') }} runs-on: ubuntu-24.04 environment: name: orbit-cloud-test deployment: false timeout-minutes: 2 permissions: contents: read pull-requests: read steps: - uses: actions/checkout@v6.0.2 with: persist-credentials: false - name: Send release result env: GH_TOKEN: ${{ github.token }} FEISHU_DEPLOY_NOTIFY_WEBHOOK: ${{ secrets.FEISHU_DEPLOY_NOTIFY_WEBHOOK }} CHECKS_RESULT: ${{ needs.checks.result }} IMAGES_RESULT: ${{ needs.images.result }} PROMOTE_RESULT: ${{ needs.promote.result }} ORBIT_RECEIPT: ${{ needs.promote.outputs.receipt }} run: node .github/scripts/notify-cloud-test.mjs