Skip to content

build&publishtoDockerHub #1398

build&publishtoDockerHub

build&publishtoDockerHub #1398

name: build&publishtoDockerHub
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+(.*)'
workflow_dispatch:
inputs:
version:
description: 'Version to bump to'
required: false
workflow_call:
jobs:
docker-build-publish:
runs-on: ubuntu-latest-4-cores
strategy:
matrix:
CUDA_SHORT_VERSION: ['11.8']
fail-fast: true
steps:
- name: checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: get most recent tag
run: |
echo "RELEASE_VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
echo "CUDA_SHORT_VERSION=${{ matrix.CUDA_SHORT_VERSION }}" >> $GITHUB_ENV
- name: check env
run: |
echo $RELEASE_VERSION
echo ${{ env.RELEASE_VERSION }}
echo $CUDA_SHORT_VERSION
echo ${{ env.CUDA_SHORT_VERSION }}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Graph-App-Kit
env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
run: |
cd src/docker \
&& GRAPHISTRY_FORGE_BASE_VERSION=v${{ env.RELEASE_VERSION }}-${{ env.CUDA_SHORT_VERSION }} docker compose -f docker-compose.yml build
- name: tag the image
run: |
docker tag graphistry/graph-app-kit-st:latest-${{ env.CUDA_SHORT_VERSION }} graphistry/graph-app-kit-st:v${{ env.RELEASE_VERSION }}-${{ env.CUDA_SHORT_VERSION }}
- name: Publish Graph-App-Kit to DockerHub
run: |
docker push graphistry/graph-app-kit-st:v${{ env.RELEASE_VERSION }}-${{ env.CUDA_SHORT_VERSION }} && docker push graphistry/graph-app-kit-st:latest-${{ env.CUDA_SHORT_VERSION }}