forked from github/plane
Merge pull request #2698 from makeplane/dev/mg-branch-build-2
Dev/mg branch build 2
This commit is contained in:
34
.github/workflows/build-branch.yml
vendored
34
.github/workflows/build-branch.yml
vendored
@@ -2,30 +2,29 @@
|
|||||||
name: Docker Branch Build
|
name: Docker Branch Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
# push:
|
push:
|
||||||
# branches:
|
branches:
|
||||||
# - "*"
|
- master
|
||||||
|
- release
|
||||||
|
- qa
|
||||||
|
- develop
|
||||||
|
# - dev/mg-branch-build-2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- closed
|
- closed
|
||||||
workflow_dispatch:
|
branches:
|
||||||
inputs:
|
- master
|
||||||
logLevel:
|
- release
|
||||||
description: 'Log level'
|
- qa
|
||||||
required: true
|
- develop
|
||||||
default: 'warning'
|
# - mg-test-develop
|
||||||
tags:
|
|
||||||
description: 'Dev/QA Builds'
|
|
||||||
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TARGET_BRANCH: ''
|
TARGET_BRANCH: ''
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
branch_build_and_push:
|
branch_build_and_push:
|
||||||
if: ${{ (github.event_name == 'pull_request') && (( github.event.action =='closed' && github.event.pull_request.merged == true) || ( github.event.action =='opened'|| github.event.action =='synchronize'))}}
|
if: ${{ (github.event_name == 'push') || (github.event_name == 'pull_request' && github.event.action =='closed' && github.event.pull_request.merged == true) }}
|
||||||
name: Build-Push Web/Space/API/Proxy Docker Image
|
name: Build-Push Web/Space/API/Proxy Docker Image
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
@@ -38,8 +37,8 @@ jobs:
|
|||||||
run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV
|
run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Set Target Branch Name on other than PR close
|
- name: Set Target Branch Name on other than PR close
|
||||||
if: ${{ github.event.action !='closed' }}
|
if: ${{ github.event_name == 'push' }}
|
||||||
run: echo "TARGET_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
|
run: echo "TARGET_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: ASzc/change-string-case-action@v2
|
- uses: ASzc/change-string-case-action@v2
|
||||||
id: gh_branch_upper_lower
|
id: gh_branch_upper_lower
|
||||||
@@ -220,4 +219,3 @@ jobs:
|
|||||||
DOCKER_BUILDKIT: 1
|
DOCKER_BUILDKIT: 1
|
||||||
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
DOCKET_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
|
DOCKET_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user