Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .eslintrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions .gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

71 changes: 0 additions & 71 deletions .github/workflows/build.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ env:

jobs:
stable:
name: Stable Templates
name: Stable CFn templates
runs-on: ubuntu-latest
permissions:
id-token: write # needed to interact with GitHub's OIDC Token endpoint.
contents: read
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get the version tag
run: echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV

- name: node.js setup
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'

- name: Install dependencies
run: yarn install --check-files
Expand All @@ -36,7 +36,7 @@ jobs:
aws-region: us-west-2

- name: cdk synth
run: $(npm bin)/cdk synth --no-version-reporting
run: npm run synth --no-version-reporting
env:
BSS_FILE_ASSET_PREFIX: stable/

Expand All @@ -52,22 +52,22 @@ jobs:
run: npx cdk-assets publish --path cdk.out/Supabase.assets.json --verbose

version:
name: Version Templates
name: Versioning CFn templates
runs-on: ubuntu-latest
permissions:
id-token: write # needed to interact with GitHub's OIDC Token endpoint.
contents: read
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get the version tag
run: echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV

- name: node.js setup
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'

- name: Install dependencies
run: yarn install --check-files
Expand All @@ -79,7 +79,7 @@ jobs:
aws-region: us-west-2

- name: cdk synth
run: $(npm bin)/cdk synth --no-version-reporting
run: npm run synth synth --no-version-reporting
env:
BSS_FILE_ASSET_PREFIX: ${{ env.TAG }}/

Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/cfn-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: publish
on:
push:
branches:
- main
workflow_dispatch: {}

env:
BSS_FILE_ASSET_BUCKET_NAME: 'supabase-on-aws-${AWS::Region}'
BSS_FILE_ASSET_REGION_SET: us-east-1,us-west-2,eu-west-1,ap-northeast-1,ap-northeast-2,ap-northeast-3,ap-southeast-1,ap-southeast-2
BSS_FILE_ASSET_PREFIX: latest/

jobs:
latest:
name: Latest Cfn templates
runs-on: ubuntu-latest
permissions:
id-token: write # needed to interact with GitHub's OIDC Token endpoint.
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
src/**/*
.projenrc.js
.github/workflows/publish.yml

- name: node.js setup
if: env.GIT_DIFF
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
if: env.GIT_DIFF
run: yarn install --check-files

- name: Configure AWS credentials
if: env.GIT_DIFF
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.CDK_PUBLISHING_ROLE }}
aws-region: us-west-2

- name: cdk synth
if: env.GIT_DIFF
run: npm run synth --no-version-reporting

- name: remove old template
if: env.GIT_DIFF
run: |
region_list=(${BSS_FILE_ASSET_REGION_SET//,/ })
for region in ${region_list[@]}; do
bucket_name=(${BSS_FILE_ASSET_BUCKET_NAME//\$\{AWS::Region\}/$region})
aws s3 rm s3://$bucket_name/${BSS_FILE_ASSET_PREFIX}Supabase.template.json
done

- name: Publish assets
if: env.GIT_DIFF
run: npx cdk-assets publish --path cdk.out/Supabase.assets.json --verbose
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ on:
- main
workflow_dispatch: {}

env:
ECR_PUBLIC_ALIAS: u3p7q2r8

jobs:
kong:
name: Kong Docker Image
runs-on: ubuntu-latest
permissions:
id-token: write # needed to interact with GitHub's OIDC Token endpoint.
contents: read
env:
ECR_PUBLIC_ALIAS: u3p7q2r8
IMAGE_NAME: kong
steps:
- name: Checkout
Expand Down Expand Up @@ -47,16 +48,6 @@ jobs:
with:
registry-type: public

#- name: Extract metadata (tags, labels) for Docker
# id: meta
# uses: docker/metadata-action@v4
# with:
# images: ${{ env.ECR_PUBLIC_REGISTRY }}/${{ env.IMAGE_NAME }}
# flavor: |
# latest=true
# tags: |
# type=raw,value=lates

- name: Build and push
if: env.GIT_DIFF
uses: docker/build-push-action@v3
Expand All @@ -68,13 +59,11 @@ jobs:
tags: ${{ steps.login-ecr-public.outputs.registry }}/${{ env.ECR_PUBLIC_ALIAS }}/${{ env.IMAGE_NAME }}:latest

postgraphile:
name: PostGraphile Docker Image
runs-on: ubuntu-latest
permissions:
id-token: write # needed to interact with GitHub's OIDC Token endpoint.
contents: read
env:
ECR_PUBLIC_ALIAS: u3p7q2r8
IMAGE_NAME: postgraphile
steps:
- name: Checkout
Expand Down Expand Up @@ -119,58 +108,3 @@ jobs:
tags: |
${{ steps.login-ecr-public.outputs.registry }}/${{ env.ECR_PUBLIC_ALIAS }}/${{ env.IMAGE_NAME }}:latest
${{ steps.login-ecr-public.outputs.registry }}/${{ env.ECR_PUBLIC_ALIAS }}/${{ env.IMAGE_NAME }}:4

cloudformation:
name: CloudFormation Templates
runs-on: ubuntu-latest
permissions:
id-token: write # needed to interact with GitHub's OIDC Token endpoint.
contents: read
env:
BSS_FILE_ASSET_BUCKET_NAME: 'supabase-on-aws-${AWS::Region}'
BSS_FILE_ASSET_REGION_SET: us-east-1,us-west-2,eu-west-1,ap-northeast-1,ap-northeast-2,ap-northeast-3,ap-southeast-1,ap-southeast-2
BSS_FILE_ASSET_PREFIX: latest/
steps:
- name: Checkout
uses: actions/checkout@v2

- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
src/**/*
.projenrc.js
.github/workflows/publish.yml

- name: node.js setup
if: env.GIT_DIFF
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
if: env.GIT_DIFF
run: yarn install --check-files

- name: Configure AWS credentials
if: env.GIT_DIFF
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.CDK_PUBLISHING_ROLE }}
aws-region: us-west-2

- name: cdk synth
if: env.GIT_DIFF
run: npm run synth --no-version-reporting

- name: remove old template
if: env.GIT_DIFF
run: |
region_list=(${BSS_FILE_ASSET_REGION_SET//,/ })
for region in ${region_list[@]}; do
bucket_name=(${BSS_FILE_ASSET_BUCKET_NAME//\$\{AWS::Region\}/$region})
aws s3 rm s3://$bucket_name/${BSS_FILE_ASSET_PREFIX}Supabase.template.json
done

- name: Publish assets
if: env.GIT_DIFF
run: npx cdk-assets publish --path cdk.out/Supabase.assets.json --verbose
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-lint.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 0 additions & 23 deletions .mergify.yml

This file was deleted.

1 change: 0 additions & 1 deletion .npmignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading