diff --git a/.github/workflows/build_dev.yml b/.github/workflows/build_dev.yml new file mode 100644 index 0000000..2d1d986 --- /dev/null +++ b/.github/workflows/build_dev.yml @@ -0,0 +1,34 @@ +name: Build and Push Dev Image + +on: + push: + branches: + - 'dev-pg-v*' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract branch name + id: extract_branch + run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV + + - name: Build and push Docker images + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: mesoform/postgres-ha:${{ env.BRANCH_NAME }} \ No newline at end of file