Update to Supabase CLI version v2.9.6 #6
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: 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 | |
# with: | |
# token: ${{ secrets.PAT }} | |
- 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 }}, ghcr.io/${{ github.repository }}:latest | |
build-args: | | |
SUPABASE_CLI_VERSION=${{ env.version }} | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{ env.version }} | |
name: Release ${{ env.version }} | |
body: | | |
This release contains the Docker image version ${{ env.version }}. | |
draft: false | |
prerelease: false |