Skip to content

Commit 6e401fa

Browse files
author
Florian Goessler
committed
feat: migrate github action from private repo
0 parents  commit 6e401fa

22 files changed

Lines changed: 1348 additions & 0 deletions

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
checks:
14+
name: Checks
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
18+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
19+
- run: bun install --frozen-lockfile
20+
- name: Biome
21+
run: bunx biome ci .
22+
- name: Type check
23+
run: bun run check:types
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Smoke deploy (default mode)
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "action.yml"
9+
- "scripts/**"
10+
- "package.json"
11+
- "bun.lock"
12+
- "examples/hello-bun/**"
13+
- ".github/workflows/smoke-deploy-default.yml"
14+
workflow_dispatch:
15+
16+
# `pull_request` is intentionally omitted so untrusted PR code never runs with
17+
# the deploy secrets. Maintainers can verify a PR by merging into a temporary
18+
# branch and using `workflow_dispatch`.
19+
20+
permissions:
21+
contents: read
22+
deployments: write
23+
24+
concurrency:
25+
group: smoke-deploy-default
26+
cancel-in-progress: false
27+
28+
jobs:
29+
deploy:
30+
name: Deploy hello-bun
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
34+
35+
- name: Deploy to Prisma Compute
36+
id: deploy
37+
uses: ./
38+
with:
39+
api-token: ${{ secrets.SMOKE_PRISMA_API_TOKEN }}
40+
compute-service-id: ${{ vars.SMOKE_DEFAULT_COMPUTE_SERVICE_ID }}
41+
app-path: examples/hello-bun
42+
env-vars: |
43+
PORT=8080
44+
45+
- name: Print deployment info
46+
run: |
47+
echo "Version: ${{ steps.deploy.outputs.version-id }}"
48+
echo "Service endpoint: ${{ steps.deploy.outputs.service-endpoint-domain }}"
49+
echo "Version endpoint: ${{ steps.deploy.outputs.version-endpoint-domain }}"
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Smoke deploy (pre-built mode)
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "action.yml"
9+
- "scripts/**"
10+
- "package.json"
11+
- "bun.lock"
12+
- "examples/hello-prebuilt/**"
13+
- ".github/workflows/smoke-deploy-prebuilt.yml"
14+
workflow_dispatch:
15+
16+
# `pull_request` is intentionally omitted so untrusted PR code never runs with
17+
# the deploy secrets. Maintainers can verify a PR by merging into a temporary
18+
# branch and using `workflow_dispatch`.
19+
20+
permissions:
21+
contents: read
22+
deployments: write
23+
24+
concurrency:
25+
group: smoke-deploy-prebuilt
26+
cancel-in-progress: false
27+
28+
jobs:
29+
deploy:
30+
name: Deploy hello-prebuilt
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
34+
35+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
36+
37+
- name: Install application dependencies
38+
run: bun install --frozen-lockfile
39+
working-directory: examples/hello-prebuilt
40+
41+
- name: Build application
42+
run: bun run build
43+
working-directory: examples/hello-prebuilt
44+
45+
- name: Deploy to Prisma Compute
46+
id: deploy
47+
uses: ./
48+
with:
49+
api-token: ${{ secrets.SMOKE_PRISMA_API_TOKEN }}
50+
compute-service-id: ${{ vars.SMOKE_PREBUILT_COMPUTE_SERVICE_ID }}
51+
app-path: examples/hello-prebuilt
52+
artifact-path: examples/hello-prebuilt/dist
53+
entrypoint: server.js
54+
bun-install: "false"
55+
env-vars: |
56+
PORT=8080
57+
58+
- name: Print deployment info
59+
run: |
60+
echo "Version: ${{ steps.deploy.outputs.version-id }}"
61+
echo "Service endpoint: ${{ steps.deploy.outputs.service-endpoint-domain }}"
62+
echo "Version endpoint: ${{ steps.deploy.outputs.version-endpoint-domain }}"

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
.DS_Store
3+
4+
# Build output produced by the smoke-test workflow
5+
examples/hello-prebuilt/dist
6+
7+
.claude/settings.local.json

0 commit comments

Comments
 (0)