Merge pull request #40 from FalkorDB/copilot/upgrade-debian-gcc-13 #194
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: Build image | |
| on: | |
| push: | |
| workflow_dispatch: | |
| jobs: | |
| docker: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu | |
| - debian | |
| - rhel | |
| - rhel8 | |
| - rhel9 | |
| - amazonlinux2023 | |
| - alpine | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Generate Docker tags | |
| id: meta | |
| run: | | |
| TAGS="falkordb/falkordb-build:${{ matrix.os }}" | |
| if [[ "${{ github.ref_name }}" == "main" ]]; then | |
| TAGS="${TAGS},falkordb/falkordb-build:${{ matrix.os }}-edge" | |
| elif [[ "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then | |
| TAG_VERSION="${{ github.ref_name }}" | |
| # Strip 'v' prefix if present | |
| TAG_VERSION="${TAG_VERSION#v}" | |
| TAGS="${TAGS},falkordb/falkordb-build:${{ matrix.os }}-${TAG_VERSION}" | |
| fi | |
| echo "tags=${TAGS}" >> $GITHUB_OUTPUT | |
| - name: Build ${{ github.ref_name == 'main' && 'and push' || ''}} image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: Dockerfile.${{ matrix.os }} | |
| cache-from: | | |
| type=gha,scope=${{ matrix.os }}-${{ github.ref_name }} | |
| type=gha,scope=${{ matrix.os }}-main | |
| cache-to: type=gha,mode=max,scope=${{ matrix.os }}-${{ github.ref_name }} | |
| platforms: linux/amd64,linux/arm64 | |
| push: ${{ github.ref_name == 'main' || startsWith(github.ref, 'refs/tags/') }} | |
| tags: ${{ steps.meta.outputs.tags }} |