mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-01 11:47:01 +00:00
refactor: github actions & nightly-build
Signed-off-by: Wing-Kam Wong <wingkwong.code@gmail.com>
This commit is contained in:
34
.github/workflows/release-docker.yml
vendored
34
.github/workflows/release-docker.yml
vendored
@@ -7,13 +7,29 @@ on:
|
||||
tag:
|
||||
description: "Docker image tag"
|
||||
required: true
|
||||
# Triggered by release-nocodb.yml
|
||||
targetEnv:
|
||||
description: "Target Environment"
|
||||
required: true
|
||||
type: choice
|
||||
options:
|
||||
- DEV
|
||||
- PROD
|
||||
# Triggered by release-nocodb.yml / release-nightly-dev.yml
|
||||
workflow_call:
|
||||
inputs:
|
||||
tag:
|
||||
description: "Docker image tag"
|
||||
required: true
|
||||
type: string
|
||||
targetEnv:
|
||||
description: "Target Environment"
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
DOCKERHUB_USERNAME:
|
||||
required: true
|
||||
DOCKERHUB_TOKEN:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
buildx:
|
||||
@@ -24,6 +40,18 @@ jobs:
|
||||
matrix:
|
||||
node-version: [12]
|
||||
steps:
|
||||
- name: Get Docker Repository
|
||||
id: get-docker-repository
|
||||
run: |
|
||||
DOCKER_REPOSITORY=nocodb
|
||||
if [[ ${{ github.event.inputs.targetEnv || inputs.targetEnv }} == 'DEV' ]]; then
|
||||
DOCKER_REPOSITORY=${DOCKER_REPOSITORY}-dev
|
||||
fi
|
||||
echo "::set-output name=DOCKER_REPOSITORY::${DOCKER_REPOSITORY}"
|
||||
echo ${DOCKER_REPOSITORY}
|
||||
# - name: Verifiy
|
||||
# run : |
|
||||
# echo ${{ steps.get-docker-repository.outputs.DOCKER_REPOSITORY }}
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -73,8 +101,8 @@ jobs:
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
||||
push: true
|
||||
tags: |
|
||||
nocodb/nocodb:${{ github.event.inputs.tag || inputs.tag }}
|
||||
nocodb/nocodb:latest
|
||||
nocodb/${{ steps.get-docker-repository.outputs.DOCKER_REPOSITORY }}:${{ github.event.inputs.tag || inputs.tag }}
|
||||
nocodb/${{ steps.get-docker-repository.outputs.DOCKER_REPOSITORY }}:latest
|
||||
|
||||
# Temp fix
|
||||
# https://github.com/docker/build-push-action/issues/252
|
||||
|
||||
Reference in New Issue
Block a user