Skip to content

feat(Datasets): Add tab to display datasetversionfile columns #1228

feat(Datasets): Add tab to display datasetversionfile columns

feat(Datasets): Add tab to display datasetversionfile columns #1228

name: Build OpenHEXA Frontend
on:
release:
types: [ published ]
pull_request:
push:
branches: [ main ]
workflow_dispatch:
inputs:
tag:
description: Image tag
required: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
# see https://github.com/docker/build-push-action
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Store version number (on release)
if: ${{ github.event_name == 'release' }}
id: version
# GITHUB_REF looks like "refs/tags/0.3.1" - we need to extract the actual version without the v prefix
run: echo "number=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Caches
- name: Cache Docker build dependencies
id: cache-docker-deps
uses: actions/cache@v4
with:
path: |
var-cache-apk
code-next-cache
code-.npm-cache
key: docker-deps-${{ hashFiles('Dockerfile') }}
restore-keys: |
docker-deps-
- name: Inject caches into Docker
uses: reproducible-containers/[email protected]
with:
cache-map: |
{
"var-cache-apk": "/var/cache/apk",
"code-next-cache": "/code/.next/cache",
"code-.npm-cache": "~/.npm"
}
skip-extraction: ${{ steps.cache-docker-deps.outputs.cache-hit }}
- name: Build and push (release)
if: ${{ github.event_name == 'release' }}
uses: docker/build-push-action@v6
with:
push: true
context: .
tags: |
blsq/openhexa-frontend:${{ steps.version.outputs.number }}
blsq/openhexa-frontend:latest
cache-from: type=registry,ref=blsq/openhexa-frontend:buildcache
cache-to: type=registry,ref=blsq/openhexa-frontend:buildcache,mode=max
build-args: |
"SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}"
"RELEASE=${{ steps.version.outputs.number }}"
- name: Build and push (manual)
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: docker/build-push-action@v6
with:
context: .
push: true
file: Dockerfile
tags: |
blsq/openhexa-frontend:${{ github.event.inputs.tag }}
blsq/openhexa-frontend:latest
cache-from: type=registry,ref=blsq/openhexa-frontend:buildcache
cache-to: type=registry,ref=blsq/openhexa-frontend:buildcache,mode=max
build-args: |
"SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}"
"RELEASE=${{ steps.version.outputs.number }}"
- name: Build and push (pull request)
if: ${{ github.event_name == 'pull_request' }}
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
blsq/openhexa-frontend:pr-${{ github.event.pull_request.number }}
cache-from: type=registry,ref=blsq/openhexa-frontend:buildcache
- name: Build and push (main branch)
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
blsq/openhexa-frontend:main
cache-from: type=registry,ref=blsq/openhexa-frontend:buildcache