Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
b1864cb
feat(cli): add issue form command (#5459)
jgoux Jun 17, 2026
41159af
ci: setup dependency firewall (#5581)
staaldraad Jun 17, 2026
7c35fd6
ci: add stale issue and PR cleanup workflow (#5456)
jgoux Jun 17, 2026
3d3ca02
feat(cli): port functions deploy (#5561)
7ttp Jun 17, 2026
53ea9e5
ci: read stale cleanup dispatch inputs (#5600)
jgoux Jun 17, 2026
ca86ec7
chore: sync API types from infrastructure (#5599)
supabase-cli-releaser[bot] Jun 17, 2026
57111ae
ci: derive brew/scoop checksums from the published build (#5604)
avallete Jun 17, 2026
21b0c12
ci: enable scheduled stale cleanup (#5606)
jgoux Jun 17, 2026
cbbcd06
fix(cli): reconcile hybrid stitch+stamp identity with shared LegacyId…
seanoliver Jun 17, 2026
c6127da
ci: silence stale reopen confirmation (#5608)
jgoux Jun 17, 2026
aa764ec
chore(cli-go): unblock OpenAPI codegen for upgrade warnings (#5609)
jgoux Jun 17, 2026
049e95b
chore(ci): bump actions/github-script from 7.1.0 to 9.0.0 in the acti…
dependabot[bot] Jun 18, 2026
79fdcbd
fix(docker): bump supabase/realtime from v2.107.5 to v2.108.0 in /app…
dependabot[bot] Jun 18, 2026
32ef81c
fix(deps): bump the npm-major group with 6 updates (#5612)
dependabot[bot] Jun 18, 2026
17546b3
ci(release): free space before artifact cache save (#5610)
jgoux Jun 18, 2026
df41fbc
ci: add post-publish install channel verification workflow (#5605)
avallete Jun 18, 2026
a60a532
feat(cli): port db dump, query, and schema declarative to native Type…
Coly010 Jun 18, 2026
1d113d7
ci(release): tolerate read-only Go cache cleanup (#5617)
jgoux Jun 18, 2026
4f94f6d
fix(cli): merge matching [remotes.*] block on config push (#5618)
Coly010 Jun 18, 2026
e09cf29
fix(cli): mount test file's directory so \ir includes resolve (#5619)
Coly010 Jun 18, 2026
3016806
chore(api): simplify OpenAPI sync workflow (#5602)
jgoux Jun 18, 2026
557e3eb
test(cli-e2e): add live e2e suite covering the CLI command matrix (#5…
avallete Jun 18, 2026
7264b7c
fix(deps): bump undici from 8.4.1 to 8.5.0 (#5623)
dependabot[bot] Jun 18, 2026
0d63164
fix(docker): bump the docker-minor group in /apps/cli-go/pkg/config/t…
dependabot[bot] Jun 19, 2026
3eb35e5
fix(deps): bump the npm-major group with 11 updates (#5626)
dependabot[bot] Jun 19, 2026
82e5fe2
ci: add dependency-cache input to setup action (#5627)
avallete Jun 19, 2026
62f7b83
fix(cli): improve local start diagnostics (#5616)
jgoux Jun 19, 2026
88c94c9
chore(cli): downgrade realtime image to v2.108.0 (#5628)
avallete Jun 19, 2026
e404074
fix(docker): bump supabase/storage-api from v1.60.21 to v1.60.22 in /…
dependabot[bot] Jun 19, 2026
979afe5
fix(deps): bump the npm-major group with 2 updates (#5631)
dependabot[bot] Jun 19, 2026
23a5db6
fix(docker): bump supabase/postgres from 17.6.1.136 to 17.6.1.138 in …
dependabot[bot] Jun 20, 2026
8e119e1
feat(cli): add --reveal flag to projects api-keys (#5633)
Coly010 Jun 20, 2026
8de126c
ci(release): register QEMU before containerd restart for arm64 smoke …
avallete Jun 20, 2026
f3b6c38
fix(deps): bump github.com/containerd/containerd/v2 from 2.2.4 to 2.2…
dependabot[bot] Jun 20, 2026
9612825
ci(release): mount binfmt_misc on the host for arm64 smoke tests on c…
avallete Jun 20, 2026
893960a
fix(docker): bump supabase/storage-api from v1.60.22 to v1.60.26 in /…
dependabot[bot] Jun 21, 2026
39d6bda
fix(deps): bump the npm-major group across 1 directory with 11 update…
dependabot[bot] Jun 22, 2026
fbbc609
chore(ci): use app token for API sync automerge (#5603)
jgoux Jun 22, 2026
17a84e6
fix(functions): forward npm auth token to Docker bundler (#5645)
jgoux Jun 22, 2026
50fcced
fix(cli): chunk storage delete requests to respect API cap (#1814) (#…
avallete Jun 22, 2026
dfceef8
fix(cli): keep test db local connections plaintext (#5644)
jgoux Jun 22, 2026
db5c4a3
chore(stack): bump mailpit to v1.30.2 (#5647)
jgoux Jun 22, 2026
d775bb3
chore(cli): read Postgres image from Dockerfile manifest (#5649)
jgoux Jun 22, 2026
ba7ef28
refactor(cli-go): extract envOrDefault helper and make Kong workers c…
avallete Jun 22, 2026
64260c1
chore(api): sync Management API OpenAPI spec (#5621)
supabase-cli-releaser[bot] Jun 22, 2026
afcaa27
feat: clean up report table output and add rules (#5253)
encima Jun 22, 2026
b4dec62
fix(docker): bump the docker-minor group in /apps/cli-go/pkg/config/t…
dependabot[bot] Jun 23, 2026
74c88c8
feat(cli): expose SUPABASE_PUBLISHABLE_KEY in branches get env output…
mittal-parth Jun 23, 2026
39c21c0
fix(cli): fall back to podman for local typegen (#5658)
jgoux Jun 23, 2026
90222aa
chore: sync API types from infrastructure (#5659)
supabase-cli-releaser[bot] Jun 23, 2026
69205ff
feat(cli): port functions list (#5652)
7ttp Jun 23, 2026
2ce303a
fix: preserve verify_jwt setting when not in config.toml (#5348)
deepshekhardas Jun 23, 2026
41d9f2b
feat(cli): port `supabase seed buckets` to native TypeScript (#5651)
Coly010 Jun 23, 2026
64cdb69
feat(cli): port functions serve (#5634)
7ttp Jun 23, 2026
df3c740
feat(cli): port db diff and db pull to native TypeScript (CLI-1313) (…
Coly010 Jun 23, 2026
6296610
feat(cli): add registry fallbacks for Docker image pulls (#5660)
jgoux Jun 23, 2026
1bf3611
feat(cli): add local_smtp config (#5333)
7ttp Jun 23, 2026
0df4840
chore(api): sync Management API OpenAPI spec (#5662)
supabase-cli-releaser[bot] Jun 23, 2026
d314f76
chore(ci): exclude generated API code from CODEOWNERS review (#5663)
jgoux Jun 23, 2026
b672b15
ci: auto-approve and auto-merge API package sync PRs (#5665)
jgoux Jun 23, 2026
6fa5fd5
fix(docker): bump logflare to 1.45.3 (#5666)
jgoux Jun 23, 2026
3f583a0
fix(docker): bump supabase/storage-api from v1.60.29 to v1.61.0 in /a…
dependabot[bot] Jun 23, 2026
242812b
fix(deps): bump github.com/getsentry/sentry-go from 0.46.2 to 0.47.0 …
dependabot[bot] Jun 23, 2026
04f3907
fix(docker): bump the docker-minor group in /apps/cli-go/pkg/config/t…
dependabot[bot] Jun 24, 2026
04b9db4
chore(ci): bump actions/checkout from 6.0.3 to 7.0.0 in the actions-m…
dependabot[bot] Jun 24, 2026
7a6d456
test(cli): guard config schema against inbucket name leakage (#5664)
jgoux Jun 24, 2026
71338e6
ci(cli): add macOS code signing with rcodesign (#5675)
avallete Jun 24, 2026
fefe607
fix(docker): bump supabase/postgres from 17.6.1.138 to 17.6.1.139 in …
dependabot[bot] Jun 24, 2026
346fec8
fix(stack): retry edge function cold-start to avoid first-request 502…
jgoux Jun 24, 2026
89e3ccd
fix(cli): serve edge functions offline by bundling the runtime templa…
jgoux Jun 24, 2026
88062fc
chore(api): sync Management API OpenAPI spec (#5676)
supabase-cli-releaser[bot] Jun 24, 2026
e26ac14
chore(deps): bump nx from 22.7.5 to 23.0.0 in the npm-major group acr…
dependabot[bot] Jun 24, 2026
5a7d2e5
fix(cli): bundle the Go edge-runtime template for offline supabase st…
jgoux Jun 24, 2026
6ff1a86
feat(cli): port supabase storage ls/cp/mv/rm to native TypeScript (#5…
Coly010 Jun 24, 2026
dcb9e53
fix(cli): wait for all image pulls before starting containers (#5681)
Coly010 Jun 24, 2026
148d4b4
ci(cli): free disk space before building cross-compiled binaries (#5685)
avallete Jun 24, 2026
4bb2574
fix(cli): respect SUPABASE_HOME across fallback paths (#5624)
ametel01 Jun 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@
/apps/cli-go/pkg/config/templates/Dockerfile
/pnpm-lock.yaml
/pnpm-workspace.yaml

# Generated code. These ownerless rules override the catch-all above so
# CI-green sync PRs (e.g. Management API OpenAPI spec) can be auto-merged.
/packages/api/src/generated/
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ body:
- type: input
id: ticket-id
attributes:
label: Debug ticket ID
description: If possible, rerun the failing command with `--create-ticket` and paste the ticket ID.
label: Crash report ID
description: If the CLI printed one after rerunning with `--create-ticket`, paste the crash report ID.
placeholder: ab1ac733e31e4f928a4d7c8402543712
validations:
required: false
Expand Down
37 changes: 29 additions & 8 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,26 @@ name: Setup

description: Perform standard setup and install dependencies using pnpm

inputs:
dependency-firewall-token:
description: Token used to authenticate the Dependency Firewall registry
required: false
default: ""
dependency-cache:
description: >-
Whether to enable the pnpm dependency cache. Disable this when the job
deletes the pnpm store before exiting, otherwise the post-job cache save
fails with a path validation error.
required: false
default: "true"

runs:
using: "composite"
steps:
- name: Resolve Bun version
shell: bash
run: echo "BUN_VERSION=1.3.13" >> "$GITHUB_ENV"

- name: Restore Bun toolchain cache
id: bun-toolchain-cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: /opt/hostedtoolcache/bun
key: bun-toolchain-${{ runner.os }}-${{ runner.arch }}-${{ env.BUN_VERSION }}

- name: Install Bun
id: install-bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
Expand Down Expand Up @@ -49,10 +55,25 @@ runs:
run: npm install --global --force corepack && corepack enable

- name: Configure dependency cache
if: inputs.dependency-cache == 'true'
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
cache: pnpm

- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
env:
DEPENDENCY_FIREWALL_TOKEN: ${{ inputs.dependency-firewall-token }}
run: |
if [ -z "$DEPENDENCY_FIREWALL_TOKEN" ]; then
echo "Dependency Firewall token unavailable; using default npm registry."
pnpm install --frozen-lockfile
exit 0
fi

npmrc="${RUNNER_TEMP}/dependency-firewall.npmrc"
{
echo "registry=https://firewall.depthfirst.com/npm/"
echo "//firewall.depthfirst.com/npm/:_authToken=${DEPENDENCY_FIREWALL_TOKEN}"
} > "$npmrc"
NPM_CONFIG_USERCONFIG="$npmrc" pnpm install --frozen-lockfile
Comment thread
depthfirst-app[bot] marked this conversation as resolved.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ updates:
- dependency-name: "axllent/mailpit"
- dependency-name: "darthsim/imgproxy"
- dependency-name: "timberio/vector"
# Held back: v2.109.0+ adds a setup_supabase_realtime_admin migration
# that fails against the CLI's local Postgres and breaks `supabase start`.
# Remove once the CLI's local stack is compatible with the new migration.
- dependency-name: "supabase/realtime"
versions:
- ">= 2.109.0"
cooldown:
default-days: 7
exclude:
Expand Down
30 changes: 30 additions & 0 deletions .github/scripts/sweep-live-projects.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash
# Delete every staging project whose name starts with the given prefix (the live
# e2e job's per-run prefix). Shared by the in-run retry sweep (called best-effort
# with `|| true`) and the always() cleanup step (which propagates the exit code).
#
# Reads SUPABASE_ACCESS_TOKEN + CLI_E2E_API_URL from the environment. Exits
# non-zero if any DELETE failed; a failed *listing* also exits non-zero (pipefail).
set -o pipefail

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fail cleanup when listing projects fails

When the initial curl | jq project listing fails in the live-e2e cleanup path, this script does not actually stop: pipefail makes the refs=$(...) assignment return non-zero, but without set -e or an explicit status check bash continues with an empty refs list and exits with failed=0. In the workflow's always() cleanup step that hides API/auth/listing failures as success, so leaked staging projects can remain without a red cleanup signal.

Useful? React with 👍 / 👎.


PREFIX="${1:?usage: sweep-live-projects.sh PREFIX}"
: "${SUPABASE_ACCESS_TOKEN:?SUPABASE_ACCESS_TOKEN required}"
: "${CLI_E2E_API_URL:?CLI_E2E_API_URL required}"

# Capture the list in a var (not a pipe-to-while subshell) so a failed delete is
# recorded in $failed; a failed listing aborts here via pipefail.
refs=$(curl -fsS -H "Authorization: Bearer ${SUPABASE_ACCESS_TOKEN}" \
"${CLI_E2E_API_URL}/v1/projects" \
| jq -r --arg p "$PREFIX" '.[] | select(.name|startswith($p)) | .ref // .id')

failed=0
for ref in $refs; do
[ -n "$ref" ] || continue
echo "deleting leftover project $ref"
if ! curl -fsS -X DELETE -H "Authorization: Bearer ${SUPABASE_ACCESS_TOKEN}" \
"${CLI_E2E_API_URL}/v1/projects/${ref}" >/dev/null; then
echo "::error::failed to delete leftover project $ref"
failed=1
fi
done
exit "$failed"
75 changes: 19 additions & 56 deletions .github/workflows/api-package-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,71 +9,18 @@ permissions:
contents: read

jobs:
detect:
name: Detect OpenAPI changes
runs-on: blacksmith-8vcpu-ubuntu-2404
outputs:
has_changes: ${{ steps.compare.outputs.has_changes }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false

- name: Compare upstream OpenAPI spec
id: compare
shell: bash
run: |
set -euo pipefail

remote_spec="$RUNNER_TEMP/openapi.remote.json"
remote_normalized="$RUNNER_TEMP/openapi.remote.normalized.json"
tracked_normalized="$RUNNER_TEMP/openapi.tracked.normalized.json"
normalize_filter="$RUNNER_TEMP/normalize-openapi.jq"

curl -fsS https://api.supabase.com/api/v1-json -o "$remote_spec"

cat > "$normalize_filter" <<'JQ'
def pointer_path($p): $p | split("/")[1:] | map(gsub("~1"; "/") | gsub("~0"; "~"));
reduce ($overrides[0] // [])[] as $op (.;
if $op.op == "test" then
if getpath(pointer_path($op.path)) == $op.value then
.
else
error("OpenAPI override test failed at \($op.path)")
end
elif $op.op == "replace" then
setpath(pointer_path($op.path); $op.value)
else
error("Unsupported OpenAPI override op \($op.op)")
end
)
JQ

jq -S --slurpfile overrides packages/api/scripts/openapi-overrides.json \
-f "$normalize_filter" "$remote_spec" > "$remote_normalized"
jq -S . packages/api/src/generated/openapi.json > "$tracked_normalized"

if cmp -s "$remote_normalized" "$tracked_normalized"; then
echo "No upstream OpenAPI changes detected."
echo "has_changes=false" >> "$GITHUB_OUTPUT"
else
echo "Upstream OpenAPI changes detected."
echo "has_changes=true" >> "$GITHUB_OUTPUT"
diff -u "$tracked_normalized" "$remote_normalized" | sed -n '1,160p' || true
fi

sync:
name: Sync API package
needs: detect
if: needs.detect.outputs.has_changes == 'true'
runs-on: blacksmith-8vcpu-ubuntu-2404
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

- name: Setup
uses: ./.github/actions/setup
with:
dependency-firewall-token: ${{ secrets.DF_FIREWALL_TOKEN }}

- name: Regenerate API package
run: pnpm generate
Expand Down Expand Up @@ -105,6 +52,7 @@ jobs:

- name: Create Pull Request
if: steps.check.outputs.has_changes == 'true'
id: cpr
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
token: ${{ steps.app-token.outputs.token }}
Expand All @@ -116,3 +64,18 @@ jobs:
Changes were detected in the upstream OpenAPI document exposed by `https://api.supabase.com/api/v1-json`.
branch: sync/api-package
base: develop

- name: Approve a PR
if: steps.check.outputs.has_changes == 'true' && steps.cpr.outputs.pull-request-operation == 'created'
continue-on-error: true
run: gh pr review --approve --repo "${{ github.repository }}" "${STEPS_CPR_OUTPUTS_PULL_REQUEST_NUMBER}"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
STEPS_CPR_OUTPUTS_PULL_REQUEST_NUMBER: ${{ steps.cpr.outputs.pull-request-number }}

- name: Enable Pull Request Automerge
if: steps.check.outputs.has_changes == 'true'
run: gh pr merge --auto --squash --repo "${{ github.repository }}" "${STEPS_CPR_OUTPUTS_PULL_REQUEST_NUMBER}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Severity: MEDIUM

This new auto-approve + auto-merge pipeline, combined with the CODEOWNERS change making /packages/api/src/generated/ ownerless, means code generated from an external HTTP endpoint (https://api.supabase.com/api/v1-json via pnpm generate) is now merged into the repository with no human review. A supply-chain compromise of that API endpoint would result in attacker-controlled code being automatically merged.
Helpful? Add 👍 / 👎

💡 Fix Suggestion

Suggestion: This supply-chain risk requires a coordinated set of changes across multiple files to ensure generated code cannot be merged without human review:

  1. Remove the 'Approve a PR' step (lines 68–74 in the workflow): The workflow should not self-approve its own PR. Self-approval using the same app token eliminates any meaningful review gate.

  2. Remove the 'Enable Pull Request Automerge' step (lines 76–81 in the workflow, including line 78): Disabling auto-merge forces a human to explicitly trigger the merge, providing a last line of defense even if the auto-approval gate were left in place.

  3. Re-add a code owner for /packages/api/src/generated/ in .github/CODEOWNERS: The line /packages/api/src/generated/ currently has no owner, which bypasses the default @supabase/cli team requirement. Change it to /packages/api/src/generated/ @supabase/cli (or a dedicated review team) so that GitHub's branch-protection rules enforce at least one human approval before any generated code can be merged.

  4. (Optional but recommended) Add integrity verification before code generation: Before running pnpm generate, download the OpenAPI spec, verify it against a known checksum or a pinned digest, and abort if it does not match. This reduces the blast radius of a compromised upstream endpoint.

Implementing steps 1–3 together ensures that auto-created sync PRs require a genuine human review and approval from a codeowner before they can be merged into the develop branch.

env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
STEPS_CPR_OUTPUTS_PULL_REQUEST_NUMBER: ${{ steps.cpr.outputs.pull-request-number }}
2 changes: 2 additions & 0 deletions .github/workflows/apply-release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ jobs:
persist-credentials: false

- uses: ./.github/actions/setup
with:
dependency-firewall-token: ${{ secrets.DF_FIREWALL_TOKEN }}

- name: Apply notes, comment, and close
env:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/backfill-release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ on:
required: false
type: boolean
default: false
secrets:
DF_FIREWALL_TOKEN:
required: false
workflow_dispatch:
inputs:
tag:
Expand Down Expand Up @@ -48,6 +51,8 @@ jobs:
persist-credentials: false

- uses: ./.github/actions/setup
with:
dependency-firewall-token: ${{ secrets.DF_FIREWALL_TOKEN }}

- name: Backfill release notes
run: |
Expand Down
67 changes: 66 additions & 1 deletion .github/workflows/build-cli-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ on:
required: false
POSTHOG_ENDPOINT:
required: false
DF_FIREWALL_TOKEN:
required: false

permissions:
contents: read
Expand All @@ -47,15 +49,25 @@ jobs:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
POSTHOG_ENDPOINT: ${{ secrets.POSTHOG_ENDPOINT }}
# Fail the build if the macOS signing tool is missing — release artifacts
# must be signed (CLI-1621). Local builds without rcodesign degrade to a
# warning instead.
SUPABASE_CLI_REQUIRE_SIGNING: "1"
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ inputs.ref }}
persist-credentials: false

- name: Setup
uses: ./.github/actions/setup
with:
dependency-firewall-token: ${{ secrets.DF_FIREWALL_TOKEN }}
# The GitHub-hosted producer frees disk space by deleting the pnpm
# store before exiting, which would make the post-job pnpm cache save
# fail with a path validation error. Skip the dependency cache there.
dependency-cache: ${{ inputs.cache_key_suffix != '-github' }}

- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
Expand All @@ -74,9 +86,41 @@ jobs:
sudo apt-get update
sudo apt-get install -y nfpm

- name: Install rcodesign
env:
RCODESIGN_VERSION: "0.29.0"
RCODESIGN_SHA256: "dbe85cedd8ee4217b64e9a0e4c2aef92ab8bcaaa41f20bde99781ff02e600002"
run: |
set -euo pipefail
asset="apple-codesign-${RCODESIGN_VERSION}-x86_64-unknown-linux-musl.tar.gz"
curl -fsSL -o /tmp/rcodesign.tar.gz \
"https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F${RCODESIGN_VERSION}/${asset}"
echo "${RCODESIGN_SHA256} /tmp/rcodesign.tar.gz" | sha256sum -c
tar -xzf /tmp/rcodesign.tar.gz -C /tmp
sudo install -m 0755 "/tmp/apple-codesign-${RCODESIGN_VERSION}-x86_64-unknown-linux-musl/rcodesign" /usr/local/bin/rcodesign
rcodesign --version

- name: Sync versions
run: pnpm exec bun apps/cli/scripts/sync-versions.ts --version "${VERSION}"

# The GitHub-hosted ubuntu-latest runner ships only ~14 GB free on /, and
# build.ts cross-compiles 8 Bun binaries (each embeds the full Bun runtime)
# plus 6 Go binaries in parallel, then writes archives + Linux packages —
# which tips over "no space left on device" non-deterministically depending
# on the runner the attempt lands on. Reclaim the preinstalled toolchains we
# don't use (~25 GB) before building. Blacksmith runners have ample disk so
# this is gated to the github-hosted producer.
# - tool-cache stays false: setup-go installed Go into
# /opt/hostedtoolcache above, so removing it would break the Go build.
# - swap-storage stays (false = keep): the parallel bun --compile fan-out
# is memory-heavy and the swapfile guards against OOM kills.
- name: Free disk space before building
if: inputs.cache_key_suffix == '-github'
uses: supabase/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # supabase fork of jlumbroso/free-disk-space
with:
tool-cache: false
swap-storage: false

- name: Build selected shell
run: pnpm exec bun apps/cli/scripts/build.ts --version "${VERSION}" --shell "${BUN_SHELL}"

Expand All @@ -89,6 +133,27 @@ jobs:
echo "Checking dist/..."
ls -la dist/

- name: Verify macOS signatures
run: |
set -euo pipefail
for bin in packages/cli-darwin-*/bin/supabase packages/cli-darwin-*/bin/supabase-go; do
[ -f "$bin" ] || continue
echo "::group::$bin"
info="$(rcodesign print-signature-info "$bin")"
echo "$info" | grep -E 'identifier:|flags:'
echo "$info" | grep -q 'identifier: com.supabase.cli' || { echo "::error::$bin missing supabase identifier"; exit 1; }
if echo "$info" | grep -q 'LINKER_SIGNED'; then echo "::error::$bin still linker-signed"; exit 1; fi
echo "::endgroup::"
done

- name: Free space before saving GitHub-hosted artifacts cache
if: inputs.cache_key_suffix == '-github'
run: |
rm -rf node_modules apps/*/node_modules packages/*/node_modules
chmod -R u+w "$HOME/.cache/go-build" "$HOME/go/pkg/mod" 2>/dev/null || true
rm -rf "$(pnpm store path --silent)" "$HOME/.cache/go-build" "$HOME/go/pkg/mod"
df -h

- name: Check existing build artifacts cache
id: build-artifacts-cache
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cli-go-api-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: Sync API Types
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
if: steps.check.outputs.has_changes == 'true'
run: gh pr merge --auto --squash --repo "${{ github.repository }}" "${STEPS_CPR_OUTPUTS_PULL_REQUEST_NUMBER}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.app-token.outputs.token }}
STEPS_CPR_OUTPUTS_PULL_REQUEST_NUMBER: ${{ steps.cpr.outputs.pull-request-number }}
defaults:
run:
Expand Down
Loading
Loading