8000 Merge branch 'master' into feat/tables-count · joeally/postgres-meta@3ef6609 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3ef6609

Browse files
authored
Merge branch 'master' into feat/tables-count
2 parents 5afdb09 + 52d6be5 commit 3ef6609

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+3491
-1570
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @supabase/api

.github/dependabot.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,10 @@
11
version: 2
22
updates:
3-
4-
# github actions
5-
63
- package-ecosystem: "github-actions"
74
directory: "/"
85
schedule:
9-
interval: "weekly"
10-
open-pull-requests-limit: 5
11-
labels: ["github-actions", "dependencies", "pr/automerge"]
12-
13-
# npm
14-
6+
interval: "daily"
157
- package-ecosystem: "npm"
168
directory: "/"
179
schedule:
18-
interval: "weekly"
19-
open-pull-requests-limit: 15
20-
labels: ["npm", "dependencies", "pr/automerge"]
10+
interval: "daily"

.github/workflows/automerge.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Dependabot auto-merge
2+
on: pull_request
3+
4+
permissions:
5+
contents: write
6+
pull-requests: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.actor == 'dependabot[bot]' }}
12+
steps:
13+
- name: Dependabot metadata
14+
id: metadata
15+
uses: dependabot/fetch-metadata@v1
16+
with:
17+
github-token: "${{ secrets.GITHUB_TOKEN }}"
18+
19+
- name: Approve a PR
20+
if: ${{ steps.metadata.outputs.update-type != 'version-update:semver-major' && !startswith(steps.metadata.outputs.new_version, '0.') }}
21+
run: gh pr review --approve "$PR_URL"
22+
env:
23+
PR_URL: ${{ github.event.pull_request.html_url }}
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- name: Enable auto-merge for Dependabot PRs
27+
if: ${{ steps.metadata.outputs.update-type != 'version-update:semver-major' && !startswith(steps.metadata.outputs.new_version, '0.') }}
28+
run: gh pr merge --auto --squash "$PR_URL"
29+
env:
30+
PR_URL: ${{ github.event.pull_request.html_url }}
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020

2121
- run: |
2222
npm clean-install
23+
npm run check
2324
npm run test
2425
2526
prettier-check:

.github/workflows/mirror.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Mirror Image
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Image tag"
8+
required: true
9+
type: string
10+
11+
jobs:
12+
mirror:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
steps:
18+
- uses: docker/login-action@v2
19+
with:
20+
registry: public.ecr.aws
21+
username: ${{ secrets.PROD_ACCESS_KEY_ID }}
22+
password: ${{ secrets.PROD_SECRET_ACCESS_KEY }}
23+
- uses: docker/login-action@v2
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
- uses: akhilerm/tag-push-action@v2.1.0
29+
with:
30+
src: docker.io/supabase/postgres-meta:${{ inputs.version }}
31+
dst: |
32+
public.ecr.aws/supabase/postgres-meta:${{ inputs.version }}
33+
ghcr.io/supabase/postgres-meta:${{ inputs.version }}

.github/workflows/release.yml

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
npm run build
2626
2727
- id: semantic-release
28-
uses: cycjimmy/semantic-release-action@v2
28+
uses: cycjimmy/semantic-release-action@v3
2929
with:
3030
semantic_version: 18
3131
env:
@@ -66,24 +66,50 @@ jobs:
6666
needs:
6767
- semantic-release
6868
if: needs.semantic-release.outputs.new-release-published == 'true'
69-
runs-on: ubuntu-20.04
69+
runs-on: ubuntu-latest
70+
permissions:
71+
contents: read
72+
packages: write
7073
steps:
71-
- uses: actions/checkout@v3
74+
- id: meta
75+
uses: docker/metadata-action@v4
76+
with:
77+
images: |
78+
supabase/postgres-meta
79+
public.ecr.aws/supabase/postgres-meta
80+
ghcr.io/supabase/postgres-meta
81+
tags: |
82+
type=raw,value=v${{ needs.semantic-release.outputs.new-release-version }}
7283
7384
- uses: docker/setup-qemu-action@v2
7485
with:
7586
platforms: amd64,arm64
76-
7787
- uses: docker/setup-buildx-action@v2
7888

79-
- uses: docker/login-action@v2
89+
- name: Login to DockerHub
90+
uses: docker/login-action@v2
8091
with:
8192
username: ${{ secrets.DOCKER_USERNAME }}
8293
password: ${{ secrets.DOCKER_PASSWORD }}
8394

95+
- name: Login to ECR
96+
uses: docker/login-action@v2
97+
with:
98+
registry: public.ecr.aws
99+
username: ${{ secrets.PROD_ACCESS_KEY_ID }}
100+
password: ${{ secrets.PROD_SECRET_ACCESS_KEY }}
101+
102+
- name: Login to GHCR
103+
uses: docker/login-action@v2
104+
with:
105+
registry: ghcr.io
106+
username: ${{ github.actor }}
107+
password: ${{ secrets.GITHUB_TOKEN }}
108+
84109
- uses: docker/build-push-action@v3
85110
with:
86-
context: .
87-
platforms: linux/amd64,linux/arm64
88111
push: true
89-
tags: supabase/postgres-meta:latest,supabase/postgres-meta:v${{ needs.semantic-release.outputs.new-release-version }}
112+
platforms: linux/amd64,linux/arm64
113+
tags: ${{ steps.meta.outputs.tags }}
114+
cache-from: type=gha
115+
cache-to: type=gha,mode=max

.kodiak.toml

Lines changed: 0 additions & 20 deletions
This file was deleted.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM node:16 as build
22
WORKDIR /usr/src/app
33
# Do `npm ci` separately so we can cache `node_modules`
44
# https://nodejs.org/en/docs/guides/nodejs-docker-webapp/
5-
COPY package.json package-lock.json .
5+
COPY package.json package-lock.json ./
66
RUN npm clean-install
77
COPY . .
88
RUN npm run build:server

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ Helpers:
7373
Set the following ENV VARS:
7474

7575
```bash
76+
PG_META_HOST="0.0.0.0"
7677
PG_META_PORT=8080
7778
PG_META_DB_HOST="postgres"
7879
PG_META_DB_NAME="postgres"
@@ -108,3 +109,4 @@ Apache 2.0
108109
We are building the features of Firebase using enterprise-grade, open source products. We support existing communities wherever possible, and if the products don’t exist we build them and open source them ourselves.
109110

110111
[![New Sponsor](https://user-images.githubusercontent.com/10214025/90518111-e74bbb00-e198-11ea-8f88-c9e3c1aa4b5b.png)](https://github.com/sponsors/supabase)
112+

jest.config.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0