forked from github/plane
dev: Modified the branch-build action yaml (#2704)
* cherrypicked code * removed PUSH event
This commit is contained in:
parent
63d1ad286b
commit
f7cc2eca36
23
.github/workflows/build-branch.yml
vendored
23
.github/workflows/build-branch.yml
vendored
@ -2,12 +2,6 @@
|
|||||||
name: Branch Build
|
name: Branch Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- release
|
|
||||||
- qa
|
|
||||||
- develop
|
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- closed
|
- closed
|
||||||
@ -18,24 +12,25 @@ on:
|
|||||||
- develop
|
- develop
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TARGET_BRANCH: ''
|
TARGET_BRANCH: ${{ github.event.pull_request.base.ref }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
branch_build_and_push:
|
branch_build_and_push:
|
||||||
if: ${{ (github.event_name == 'push') || (github.event_name == 'pull_request' && github.event.action =='closed' && github.event.pull_request.merged == true) }}
|
if: ${{ (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
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repo
|
- name: Check out the repo
|
||||||
uses: actions/checkout@v3.3.0
|
uses: actions/checkout@v3.3.0
|
||||||
- name: Set Target Branch Name on PR close
|
|
||||||
if: ${{ github.event_name == 'pull_request' && github.event.action =='closed' }}
|
# - name: Set Target Branch Name on PR close
|
||||||
run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV
|
# if: ${{ github.event_name == 'pull_request' && github.event.action =='closed' }}
|
||||||
|
# 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_name == 'push' }}
|
# if: ${{ github.event_name == 'push' }}
|
||||||
run: echo "TARGET_BRANCH=${{ github.ref_name }}" >> $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
|
||||||
|
Loading…
Reference in New Issue
Block a user