Skip to content

Add application name with driver and metabase versions (#54) #8

Add application name with driver and metabase versions (#54)

Add application name with driver and metabase versions (#54) #8

Workflow file for this run

name: Build and Publish Docker Image
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
version:
description: "Version to build and publish"
required: true
jobs:
dockerhub:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Metabase Repo
uses: actions/checkout@v3
with:
repository: metabase/metabase
ref: v0.50.10
- name: Checkout Driver Repo
uses: actions/checkout@v3
with:
path: modules/drivers/materialize
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 11
- name: Install Clojure CLI
run: |
curl -O https://download.clojure.org/install/linux-install-1.11.1.1262.sh &&
sudo bash ./linux-install-1.11.1.1262.sh
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: "18"
cache: "yarn"
- name: Get M2 cache
uses: actions/cache@v2
with:
path: |
~/.m2
~/.gitlibs
key: ${{ runner.os }}-materialize-${{ hashFiles('**/deps.edn') }}
- name: Prepare stuff for pulses
run: yarn build-static-viz
- name: Build Materialize driver
run: |
echo "{:deps {metabase/materialize {:local/root \"materialize\" }}}" > modules/drivers/deps.edn
bin/build-driver.sh materialize
mkdir -p modules/drivers/materialize/.build
cp resources/modules/materialize.metabase-driver.jar modules/drivers/materialize/.build/materialize-driver.jar
- name: Use QEMU for multi-platform images
uses: docker/setup-qemu-action@v2
- name: Use buildx for multi-platform images
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: materializebot
password: ${{ secrets.DOCKER_HUB_MATERIALIZEBOT_API_KEY }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: materialize/metabase
tags: |
type=semver,pattern={{version}}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: modules/drivers/materialize
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}