Skip to content

Merge pull request #80 from mattrigg9/kong-syntax-fix #39

Merge pull request #80 from mattrigg9/kong-syntax-fix

Merge pull request #80 from mattrigg9/kong-syntax-fix #39

Workflow file for this run

name: cfn-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,ap-south-1
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@v4
- uses: technote-space/get-diff-action@v6
with:
PATTERNS: |
src/**/*
.projenrc.js
.github/workflows/cfn-publish.yml
- name: node.js setup
if: env.GIT_DIFF
uses: actions/setup-node@v4
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@v4
with:
role-to-assume: ${{ secrets.CDK_PUBLISHING_ROLE }}
aws-region: us-west-2
- name: cdk synth
if: env.GIT_DIFF
run: npx projen synth --name Supabase --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