mirror of
https://github.com/nexu-io/openmotion.git
synced 2026-12-06 15:49:39 +08:00
112 lines
3.4 KiB
YAML
112 lines
3.4 KiB
YAML
name: Release default cloud test environment
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- .dockerignore
|
|
- deploy/Dockerfile
|
|
- package.json
|
|
- package-lock.json
|
|
- 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: 5
|
|
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
|
|
- 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
|