Skip to content

sql: minor fixes (#1471) #43

sql: minor fixes (#1471)

sql: minor fixes (#1471) #43

Workflow file for this run

name: Publish
on:
push:
tags:
- "v*"
env:
IMAGE_NAME: "hstreamdb/hstream"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- builder_image: "hstreamdb/haskell:9.2"
ld_image: "hstreamdb/logdevice:latest"
tag: "${GITHUB_REF#refs/*/}"
- builder_image: "hstreamdb/haskell:rqlite_9.2"
ld_image: "hstreamdb/logdevice:rqlite"
tag: "rqlite_${GITHUB_REF#refs/*/}"
steps:
- run: |
echo "${{ matrix.tag }}"
- uses: actions/checkout@v3
with:
submodules: "recursive"
# We need tags. Also see: https://github.com/actions/checkout/issues/701
fetch-depth: 0
- name: Get version info
run: |
echo "LATEST_TAG=$(git describe --tag --abbrev=0)" >> $GITHUB_ENV
echo "CURRENT_COMMIT=$(git rev-parse HEAD)" >> $GITHUB_ENV
echo "LATEST_TAG: $LATEST_TAG, CURRENT_COMMIT: $CURRENT_COMMIT"
- name: Docker build
run: |
docker build . -f docker/Dockerfile \
--build-arg BUILDER_IMAGE=${{ matrix.builder_image }} \
--build-arg LD_IMAGE=${{ matrix.ld_image }} \
--build-arg HSTREAM_VERSION=${{ env.LATEST_TAG }} \
--build-arg HSTREAM_VERSION_COMMIT=${{ env.CURRENT_COMMIT }} \
-t ${IMAGE_NAME}:${{ matrix.tag }}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push image to dockerhub
run: docker push ${IMAGE_NAME}:${{ matrix.tag }}
trigger:
runs-on: ubuntu-latest
needs: build
steps:
- name: Trigger integration-tests ci
run: |
URL=https://api.github.com/repos/hstreamdb/integration-tests/dispatches
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.PERSONAL_ACCESS_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
$URL \
--data "{\"event_type\": \"image_updated\", \"client_payload\": { \"tag\": \"$TAG\", \"commit_sha\": \"$GITHUB_SHA\" }}"
- name: Trigger jepsen-tests ci
run: |
URL=https://api.github.com/repos/hstreamdb/jepsen.hstream/dispatches
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.PERSONAL_ACCESS_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
$URL \
--data "{\"event_type\": \"image_updated\", \"client_payload\": { \"tag\": \"$TAG\", \"commit_sha\": \"$GITHUB_SHA\" }}"