diff --git a/.github/workflows/release-image.yml b/.github/workflows/release-image.yml new file mode 100644 index 00000000..679a5ae8 --- /dev/null +++ b/.github/workflows/release-image.yml @@ -0,0 +1,37 @@ +name: Release image to DockerHub + +on: + workflow_dispatch: + push: + tags: ["v*.*.*"] + branches: + - main + +jobs: + build-and-release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set tags + run: | + if ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}; then + echo "TAGS=falkordb/code-graph-frontend:latest,falkordb/code-graph-frontend:${{ github.ref_name }}" >> $GITHUB_ENV + else + echo "TAGS=falkordb/code-graph-frontend: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 }} diff --git a/Dockerfile b/Dockerfile index d5862299..d338bda6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Use a Node.js base image -FROM node:20 +FROM node:22 # Set working directory WORKDIR /app