diff --git a/.github/workflows/build-branch.yml b/.github/workflows/build-branch.yml index 05e11fc22..d921c185a 100644 --- a/.github/workflows/build-branch.yml +++ b/.github/workflows/build-branch.yml @@ -2,30 +2,29 @@ name: Docker Branch Build on: - # push: - # branches: - # - "*" + push: + branches: + - master + - release + - qa + - develop + # - dev/mg-branch-build-2 pull_request: types: - - opened - - synchronize - closed - workflow_dispatch: - inputs: - logLevel: - description: 'Log level' - required: true - default: 'warning' - tags: - description: 'Dev/QA Builds' - + branches: + - master + - release + - qa + - develop + # - mg-test-develop env: TARGET_BRANCH: '' jobs: 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 runs-on: ubuntu-20.04 @@ -38,8 +37,8 @@ jobs: run: echo "TARGET_BRANCH=${{ github.event.pull_request.base.ref }}" >> $GITHUB_ENV - name: Set Target Branch Name on other than PR close - if: ${{ github.event.action !='closed' }} - run: echo "TARGET_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV + if: ${{ github.event_name == 'push' }} + run: echo "TARGET_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV - uses: ASzc/change-string-case-action@v2 id: gh_branch_upper_lower @@ -220,4 +219,3 @@ jobs: DOCKER_BUILDKIT: 1 DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKET_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} -