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

Jordigh/update stable docker build #1103

Merged
merged 3 commits into from
Jul 12, 2024
Merged
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
36 changes: 30 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ on:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
tag:
description: "Tag for the resulting images"
type: string
required: True
default: 'stable'

env:
TAG: ${{ inputs.tag || 'stable' }}
DOCKER_HUB_OWNER: ${{ vars.DOCKER_HUB_OWNER || github.repository_owner }}

jobs:
push_to_registry:
Expand All @@ -19,14 +29,14 @@ jobs:
repo: "grist-core"
- name: "grist"
repo: "grist-ee"
# For now, we build it twice, with `grist-ee` being a
# backwards-compatible synoym for `grist`.
- name: "grist-ee"
repo: "grist-ee"
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Add a dummy ext/ directory
run:
mkdir ext && touch ext/dummy

- name: Check out the ext/ directory
if: matrix.image.name != 'grist-oss'
run: buildtools/checkout-ext-directory.sh ${{ matrix.image.repo }}
Expand All @@ -43,7 +53,7 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
stable
${{ env.TAG }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

Expand All @@ -65,5 +75,19 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-contexts: ${{ matrix.image.name != 'grist-oss' && 'ext=ext' || '' }}
build-contexts: ext=ext

- name: Push Enterprise to Docker Hub
if: ${{ matrix.image.name == 'grist' }}
uses: docker/build-push-action@v2
with:
context: .
build-args: |
BASE_IMAGE=${{ env.DOCKER_HUB_OWNER }}/${{ matrix.image.name}}
BASE_VERSION=${{ env.TAG }}
file: ext/Dockerfile
platforms: ${{ env.PLATFORMS }}
push: true
tags: ${{ env.DOCKER_HUB_OWNER }}/grist-ee:${{ env.TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
Loading