mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-05 22:38:48 +00:00
* adding workflow code for server-ce image * adding separate workflow for develop and latest docker image build * added slack notification only on failure * made changes in heading * changed heading * naming correction * added latest build workflow and server build to trigger manually * added the develop tag server-ce * filename change * added latest tag * made change to build after pr is merged
99 lines
No EOL
3.2 KiB
YAML
99 lines
No EOL
3.2 KiB
YAML
name: Tooljet develop docker image build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- develop
|
|
|
|
workflow_dispatch:
|
|
inputs:
|
|
job-to-run:
|
|
description: Enter the job name (tooljet-develop-image/tooljet-server-develop-image)
|
|
options: ['tooljet-develop-image', 'tooljet-server-develop-image']
|
|
required: true
|
|
|
|
jobs:
|
|
tooljet-develop-image:
|
|
runs-on: ubuntu-latest
|
|
if: |
|
|
${{ github.ref == 'refs/heads/develop' }} &&
|
|
${{ github.event_name == 'workflow_dispatch' && github.event.inputs.job-to-run == 'tooljet-develop-image' }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
ref: refs/heads/develop
|
|
|
|
- name: Set DOCKER_CLI_EXPERIMENTAL
|
|
run: echo "DOCKER_CLI_EXPERIMENTAL=enabled" >> $GITHUB_ENV
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Docker Login
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Build and Push Docker image
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: .
|
|
file: docker/production.Dockerfile
|
|
push: true
|
|
tags: tooljet/tooljet-ce:develop
|
|
platforms: linux/amd64
|
|
env:
|
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Send Slack Notification on Failure
|
|
if: failure()
|
|
run: |
|
|
message="Job '${{ env.JOB_NAME }}' failed! tooljet/tooljet-ce:develop"
|
|
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"$message\"}" ${{ secrets.SLACK_WEBHOOK_URL_OPS_CHANNEL }}
|
|
|
|
|
|
tooljet-server-develop-image:
|
|
runs-on: ubuntu-latest
|
|
if: |
|
|
${{ github.ref == 'refs/heads/develop' }} &&
|
|
${{ github.event_name == 'workflow_dispatch' && github.event.inputs.job-to-run == 'tooljet-server-develop-image' }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
ref: refs/heads/develop
|
|
|
|
- name: Set DOCKER_CLI_EXPERIMENTAL
|
|
run: echo "DOCKER_CLI_EXPERIMENTAL=enabled" >> $GITHUB_ENV
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Docker Login
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Build and Push Docker image
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: .
|
|
file: docker/server.Dockerfile
|
|
push: true
|
|
tags: tooljet/tooljet-ce:develop
|
|
platforms: linux/amd64
|
|
env:
|
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Send Slack Notification on Failure
|
|
if: failure()
|
|
run: |
|
|
message="Job '${{ env.JOB_NAME }}' failed! tooljet/tooljet-ce:develop"
|
|
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"$message\"}" ${{ secrets.SLACK_WEBHOOK_URL_OPS_CHANNEL }} |