Merge pull request #618 from FalkorDB/staging #14
This file contains hidden or 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: 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@v6 | |
| - name: Set tags | |
| run: | | |
| if ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}; then | |
| echo "TAGS=falkordb/code-graph:latest,falkordb/code-graph:${{ github.ref_name }}" >> $GITHUB_ENV | |
| else | |
| echo "TAGS=falkordb/code-graph:edge" >> $GITHUB_ENV | |
| fi | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Build image | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: true | |
| tags: ${{ env.TAGS }} |