Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docker Hub release workflow #31

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .github/workflows/dockerhub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Build and Publish Docker Image

on:
push:
tags:
- "v*"

jobs:
dockerhub:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Metabase Repo
uses: actions/checkout@v3
with:
repository: metabase/metabase
ref: v0.47.0

- 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/

- 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 }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Materialize driver for Metabase

[![Slack Badge](https://img.shields.io/badge/Join%20us%20on%20Slack!-blueviolet?style=flat&logo=slack&link=https://materialize.com/s/chat)](https://materialize.com/s/chat)

The `metabase-materialize-driver` lets
[Metabase](https://github.com/metabase/metabase) connect to an instance of
[Materialize](https://github.com/MaterializeInc/materialize).
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ services:
- PGPASSWORD=materialize

metabase:
image: metabase/metabase:v0.46.7
image: metabase/metabase:v0.47.0
container_name: metabase-with-materialize-driver
environment:
'MB_HTTP_TIMEOUT': '5000'
Expand Down
17 changes: 0 additions & 17 deletions project.clj

This file was deleted.