Skip to content

Update to Supabase CLI version v2.0.0 #1

Update to Supabase CLI version v2.0.0

Update to Supabase CLI version v2.0.0 #1

Workflow file for this run

name: Build and Push Docker Image
on:
pull_request:
types:
- closed
branches:
- main
jobs:
build-and-push:
name: Build and Push Docker Image
runs-on: ubuntu-latest
steps:
- name: Check if Pull Request is Merged
id: check_merged
run: |
if [ "${{ github.event.pull_request.merged }}" != "true" ]; then
echo "This workflow only runs on merged pull requests."
exit 1
fi
- name: Checkout code
uses: actions/checkout@v4
- name: Extract version from version.txt
id: get_version
run: |
VERSION=$(cat version.txt)
echo "version=$VERSION" >> $GITHUB_ENV
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ env.version }}
build-args: |
SUPABASE_CLI_VERSION=${{ env.version }}
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
body: |
This release contains the Docker image version ${{ github.ref_name }}.
draft: false
prerelease: false