Skip to content

Merge pull request #1285 from FalkorDB/1284-bump-next-to-1557 #128

Merge pull request #1285 from FalkorDB/1284-bump-next-to-1557

Merge pull request #1285 from FalkorDB/1284-bump-next-to-1557 #128

Workflow file for this run

name: Release image to DockerHub
on:
workflow_dispatch:
inputs:
cypher_version:
description: 'text-to-cypher version to release'
required: true
default: 'v0.1.5'
push:
tags: ["v*.*.*"]
branches:
- main
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Set up variables
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "CYPHER_VERSION=${{ github.event.inputs.cypher_version }}" >> $GITHUB_ENV
else
# Get the latest released version from GitHub releases
LATEST_VERSION=$(curl -s https://api.github.com/repos/falkordb/text-to-cypher/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
echo "CYPHER_VERSION=$LATEST_VERSION" >> $GITHUB_ENV
fi
- name: Checkout
uses: actions/checkout@v4
- name: Set tags
run: |
if ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}; then
echo "TAGS=falkordb/falkordb-browser:latest,falkordb/falkordb-browser:${{ github.ref_name }}" >> $GITHUB_ENV
else
echo "TAGS=falkordb/falkordb-browser:edge" >> $GITHUB_ENV
fi
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ env.TAGS }}
build-args: |
CYPHER_VERSION=${{ env.CYPHER_VERSION }}