feat(typegen): add functions setof type introspection #41
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: Canary Deploy | |
permissions: | |
contents: read | |
pull-requests: read | |
packages: write | |
id-token: write | |
on: | |
pull_request: | |
types: [opened, synchronize, labeled] | |
paths: | |
- 'src/**' | |
- 'package.json' | |
- 'package-lock.json' | |
- 'tsconfig.json' | |
- 'Dockerfile' | |
jobs: | |
build-canary: | |
# Only run if PR has the 'deploy-canary' label, is on the correct repository, and targets master branch | |
if: | | |
github.repository == 'supabase/postgres-meta' && | |
github.event.pull_request.base.ref == 'master' && | |
contains(github.event.pull_request.labels.*.name, 'deploy-canary') | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 30 | |
outputs: | |
canary-tag: ${{ steps.meta.outputs.tags }} | |
pr-number: ${{ github.event.pull_request.number }} | |
steps: | |
# Checkout fork code - safe because no secrets are available for building | |
- name: Checkout code | |
uses: actions/checkout@v5 | |
# Log PR author for auditing | |
- name: Log PR author | |
run: | | |
echo "Canary deploy triggered by: ${{ github.event.pull_request.user.login }}" | |
echo "PR #${{ github.event.pull_request.number }} from fork: ${{ github.event.pull_request.head.repo.full_name }}" | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- name: Install dependencies and build | |
run: | | |
npm clean-install | |
npm run build | |
# Generate canary tag | |
- id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
supabase/postgres-meta | |
public.ecr.aws/supabase/postgres-meta | |
ghcr.io/supabase/postgres-meta | |
tags: | | |
type=raw,value=canary-pr-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }} | |
type=raw,value=canary-pr-${{ github.event.pull_request.number }} | |
- uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: amd64,arm64 | |
- uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: configure aws credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.PROD_AWS_ROLE }} | |
aws-region: us-east-1 | |
- name: Login to ECR | |
uses: docker/login-action@v3 | |
with: | |
registry: public.ecr.aws | |
- name: Login to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push canary image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: | | |
org.opencontainers.image.title=postgres-meta-canary | |
org.opencontainers.image.description=Canary build for PR #${{ github.event.pull_request.number }} | |
org.opencontainers.image.source=${{ github.event.pull_request.head.repo.html_url }} | |
org.opencontainers.image.revision=${{ github.event.pull_request.head.sha }} | |
canary.pr.number=${{ github.event.pull_request.number }} | |
canary.pr.author=${{ github.event.pull_request.user.login }} |