-
Notifications
You must be signed in to change notification settings - Fork 393
54 lines (43 loc) · 1.34 KB
/
docker-build-and-push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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
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