feat: migrate github action from private repo #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Smoke deploy (pre-built mode) | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "action.yml" | |
| - "scripts/**" | |
| - "package.json" | |
| - "bun.lock" | |
| - "examples/hello-prebuilt/**" | |
| - ".github/workflows/smoke-deploy-prebuilt.yml" | |
| workflow_dispatch: | |
| # `pull_request` is intentionally omitted so untrusted PR code never runs with | |
| # the deploy secrets. Maintainers can verify a PR by merging into a temporary | |
| # branch and using `workflow_dispatch`. | |
| permissions: | |
| contents: read | |
| deployments: write | |
| concurrency: | |
| group: smoke-deploy-prebuilt | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| name: Deploy hello-prebuilt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | |
| - name: Install application dependencies | |
| run: bun install --frozen-lockfile | |
| working-directory: examples/hello-prebuilt | |
| - name: Build application | |
| run: bun run build | |
| working-directory: examples/hello-prebuilt | |
| - name: Deploy to Prisma Compute | |
| id: deploy | |
| uses: ./ | |
| with: | |
| api-token: ${{ secrets.SMOKE_PRISMA_API_TOKEN }} | |
| compute-service-id: ${{ vars.SMOKE_PREBUILT_COMPUTE_SERVICE_ID }} | |
| app-path: examples/hello-prebuilt | |
| artifact-path: examples/hello-prebuilt/dist | |
| entrypoint: server.js | |
| bun-install: "false" | |
| env-vars: | | |
| PORT=8080 | |
| - name: Print deployment info | |
| run: | | |
| echo "Version: ${{ steps.deploy.outputs.version-id }}" | |
| echo "Service endpoint: ${{ steps.deploy.outputs.service-endpoint-domain }}" | |
| echo "Version endpoint: ${{ steps.deploy.outputs.version-endpoint-domain }}" |