Skip to content

Fix ci pipeline

Fix ci pipeline #4

Workflow file for this run

name: dev-ci
on:
push:
branches:
- '**'
- '!main'
jobs:
leader:
runs-on: ubuntu-latest
steps:
-
name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: ./leader
file: ./leader/Dockerfile
push: true
tags: kysre/turtlemq:leader-${{ steps.extract_branch.outputs.branch }}
datanode:
runs-on: ubuntu-latest
steps:
-
name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: ./datanode
file: ./datanode/Dockerfile
push: true
tags: kysre/turtlemq:datanode-${{ steps.extract_branch.outputs.branch }}