diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index e9f186db5bba..ff3893d72643 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -48,3 +48,11 @@ jobs: OPENCODE_VERSION=${{ steps.version.outputs.tag }} cache-from: type=gha cache-to: type=gha,mode=max + + - name: Set up flyctl + uses: superfly/flyctl-actions/setup-flyctl@63da3ecc5e2793b98a3f2519b3d75d4f4c11cec2 + + - name: Deploy to Fly.io + run: flyctl deploy --image registry.fly.io/pistachiorama-opencode:${{ steps.version.outputs.tag }} --app pistachiorama-opencode --wait-timeout 120 + env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml new file mode 100644 index 000000000000..35db8cbf0b0a --- /dev/null +++ b/.github/workflows/smoke-test.yml @@ -0,0 +1,22 @@ +name: smoke-test + +on: + workflow_run: + workflows: ["Build and Push Docker Image"] + types: [completed] + +jobs: + smoke: + name: Fly.io Smoke Test + runs-on: ubicloud-standard-2 + if: ${{ github.event.workflow_run.conclusion == 'success' }} + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.workflow_run.head_sha }} + + - name: Run integration smoke test + run: bash scripts/ci/test-opencode-integration.sh + env: + OPENCODE_URL: https://pistachiorama-opencode.fly.dev + timeout-minutes: 5