Skip to content

test rocksdb docker image build #14

test rocksdb docker image build

test rocksdb docker image build #14

Workflow file for this run

name: Testing the CI
on:
push:
branches:
- rp-ci-updates
jobs:
docker:
# https://github.com/marketplace/actions/build-and-push-docker-images
runs-on: ubuntu-latest
steps:
# ensure working with latest code
- name: Checkout
uses: actions/checkout@v4
# generate a git commit hash to be used as image tag
- name: Generate short hash
id: commit-hash
run: echo "short=$( git rev-parse --short $GITHUB_SHA )" >> $GITHUB_OUTPUT
# qemu is used to emulate different platform architectures
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# cross-platform build of the image
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# authenticate for publish to docker hub
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: kavaops # TODO set from inputs
password: ${{ secrets.CI_DOCKERHUB_TOKEN }}
# publish to docker hub, tag with short git hash
- name: Build and push (rocksdb)
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile-rocksdb
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
push: false #TODO set to true
tags: kava/kava:${{ steps.commit-hash.outputs.short }}-rocksdb # TODO add master tag back in
# test:
# runs-on: ubuntu-latest
# steps:
# - name: checkout repo from current commit
# uses: actions/checkout@v4
# with:
# submodules: true
# - name: Set up Go
# uses: actions/setup-go@v4
# with:
# go-version-file: go.mod
# cache-dependency-path: |
# go.sum
# tests/e2e/kvtool/go.sum
# - name: Configure docker to use go build cache
# uses: reproducible-containers/buildkit-cache-dance@v2.1.2
# with:
# cache-source: go-build-cache
# - name: run unit tests
# run: make test
# - name: run e2e tests
# run: make docker-build test-e2e