Skip to content

Build and Push Docker Image #4

Build and Push Docker Image

Build and Push Docker Image #4

name: Build and Push Docker Image
on:
# push:
# branches:
# - devel
# pull_request:
# branches:
# - devel
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
call-backend-build:
uses: ./.github/workflows/backend-build.yml
call-frontend-build:
uses: ./.github/workflows/frontend-build.yml
build-and-push-docker:
runs-on: ubuntu-latest
needs: [call-backend-build, call-frontend-build]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download backend artifacts
uses: actions/download-artifact@v4
with:
name: backend-build-artifacts
path: deploy/cloudbeaver/
- name: Download frontend artifacts
uses: actions/download-artifact@v4
with:
name: frontend-build-artifacts
path: deploy/cloudbeaver/web
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Run custom Docker build script
working-directory: ./deploy
shell: bash
run: |
chmod +x make-docker-container.sh
./make-docker-container.sh
- name: Tag Docker Image
run: |
IMAGE_NAME=dbeaver/cloudbeaver
TAG_NAME=${{ github.head_ref || github.ref_name }}
docker tag $IMAGE_NAME:dev $IMAGE_NAME:$TAG_NAME