Merge pull request #61 from supabase-community/feat-aurora-15-3 #25
This file contains 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: ecr-publish | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: {} | |
env: | |
ECR_PUBLIC_ALIAS: u3p7q2r8 | |
jobs: | |
kong: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # needed to interact with GitHub's OIDC Token endpoint. | |
contents: read | |
env: | |
IMAGE_NAME: kong | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: technote-space/get-diff-action@v6 | |
with: | |
PATTERNS: | | |
containers/kong/**/* | |
.github/workflows/publish.yml | |
- name: Set up QEMU | |
if: env.GIT_DIFF | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
if: env.GIT_DIFF | |
uses: docker/setup-buildx-action@v2 | |
- name: Configure AWS credentials | |
if: env.GIT_DIFF | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: ${{ secrets.ECR_PUBLIC_ROLE }} | |
aws-region: us-east-1 | |
- name: Login to Amazon ECR Public | |
id: login-ecr-public | |
if: env.GIT_DIFF | |
uses: aws-actions/amazon-ecr-login@v1 | |
with: | |
registry-type: public | |
- name: Build and push | |
if: env.GIT_DIFF | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./containers/kong | |
file: ./containers/kong/Dockerfile | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ steps.login-ecr-public.outputs.registry }}/${{ env.ECR_PUBLIC_ALIAS }}/${{ env.IMAGE_NAME }}:latest | |
postgraphile: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # needed to interact with GitHub's OIDC Token endpoint. | |
contents: read | |
env: | |
IMAGE_NAME: postgraphile | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: technote-space/get-diff-action@v6 | |
with: | |
PATTERNS: | | |
containers/postgraphile/**/* | |
.github/workflows/publish.yml | |
- name: Set up QEMU | |
if: env.GIT_DIFF | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
if: env.GIT_DIFF | |
uses: docker/setup-buildx-action@v2 | |
- name: Configure AWS credentials | |
if: env.GIT_DIFF | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: ${{ secrets.ECR_PUBLIC_ROLE }} | |
aws-region: us-east-1 | |
- name: Login to Amazon ECR Public | |
id: login-ecr-public | |
if: env.GIT_DIFF | |
uses: aws-actions/amazon-ecr-login@v1 | |
with: | |
registry-type: public | |
- name: Build and push | |
if: env.GIT_DIFF | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./containers/postgraphile | |
file: ./containers/postgraphile/Dockerfile | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
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 |