Compare commits

...

18 Commits

Author SHA1 Message Date
Manish Gupta
0358255b56
Merge pull request #2700 from makeplane/dev/mg-branch-build-2
wip
2023-11-07 16:38:12 +05:30
Manish Gupta
dfa89232a6 wip 2023-11-07 16:36:53 +05:30
Manish Gupta
1d486051de
Merge pull request #2698 from makeplane/dev/mg-branch-build-2
Dev/mg branch build 2
2023-11-07 16:36:26 +05:30
Manish Gupta
cedd1f9bd8 wip 2023-11-07 16:35:24 +05:30
Manish Gupta
3f861b7083 checking push again 2023-11-07 16:30:02 +05:30
Manish Gupta
b2e0d4e6d2 checking push 2023-11-07 16:29:31 +05:30
Manish Gupta
6ca3df6c7b checking branch filter 2023-11-07 16:25:20 +05:30
Manish Gupta
d70f1bbd94 branch filter 2023-11-07 16:23:51 +05:30
Manish Gupta
ef3d3cc5de
Merge pull request #2694 from makeplane/dev/mg-branch-build-2
Dev/mg branch build 2
2023-11-07 15:23:40 +05:30
Manish Gupta
6f3609b818 wip 2023-11-07 15:17:46 +05:30
Manish Gupta
aac7b256fb wip 2023-11-07 15:14:49 +05:30
Manish Gupta
ada796dc9b wip 2023-11-07 15:12:37 +05:30
Manish Gupta
b1ca89e442 wip 2023-11-07 15:09:55 +05:30
Manish Gupta
896c36f38b wi 2023-11-07 15:03:56 +05:30
Manish Gupta
3668b1cc16 wip 2023-11-07 14:40:06 +05:30
Manish Gupta
b83fc2e879
Merge pull request #2687 from makeplane/dev/mg-branch-build-2
Dev/mg branch build 2
2023-11-07 14:15:26 +05:30
Manish Gupta
9cf171c099 trigger on pull request 2023-11-07 14:04:20 +05:30
Manish Gupta
0ab50bcef1 cherrypicked branch build code 2023-11-07 13:51:48 +05:30
2 changed files with 225 additions and 0 deletions

221
.github/workflows/build-branch.yml vendored Normal file
View File

@ -0,0 +1,221 @@
name: Docker Branch Build
on:
push:
branches:
- master
- release
- qa
- develop
# - dev/mg-branch-build-2
pull_request:
types:
- closed
branches:
- master
- release
- qa
- develop
- mg-test-develop
env:
TARGET_BRANCH: ''
jobs:
branch_build_and_push:
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
steps:
- name: Check out the repo
uses: actions/checkout@v3.3.0
- name: Set Target Branch Name on PR close
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
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
with:
string: ${{env.TARGET_BRANCH}}
- uses: mad9000/actions-find-and-replace-string@2
id: gh_branch_replace_slash
with:
source: ${{ steps.gh_branch_upper_lower.outputs.lowercase }}
find: '/'
replace: '-'
- uses: mad9000/actions-find-and-replace-string@2
id: gh_branch_replace_dot
with:
source: ${{ steps.gh_branch_replace_slash.outputs.value }}
find: '.'
replace: ''
- uses: mad9000/actions-find-and-replace-string@2
id: gh_branch_clean
with:
source: ${{ steps.gh_branch_replace_dot.outputs.value }}
find: '_'
replace: ''
- name: Uploading Proxy Source
uses: actions/upload-artifact@v3
with:
name: proxy-src-code
path: ./nginx
- name: Uploading Backend Source
uses: actions/upload-artifact@v3
with:
name: backend-src-code
path: ./apiserver
- name: Uploading Web Source
uses: actions/upload-artifact@v3
with:
name: web-src-code
path: |
./
!./apiserver
!./nginx
!./deploy
!./space
- name: Uploading Space Source
uses: actions/upload-artifact@v3
with:
name: space-src-code
path: |
./
!./apiserver
!./nginx
!./deploy
!./web
outputs:
gh_branch_name: ${{ steps.gh_branch_clean.outputs.value }}
# branch_build_push_frontend:
# runs-on: ubuntu-20.04
# needs: [ branch_build_and_push ]
# steps:
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2.5.0
# - name: Login to Docker Hub
# uses: docker/login-action@v2.1.0
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Downloading Web Source Code
# uses: actions/download-artifact@v3
# with:
# name: web-src-code
# - name: Build and Push Frontend to Docker Container Registry
# uses: docker/build-push-action@v4.0.0
# with:
# context: .
# file: ./web/Dockerfile.web
# platforms: linux/amd64
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/plane-frontend-private:${{ needs.branch_build_and_push.outputs.gh_branch_name }}
# push: true
# env:
# DOCKER_BUILDKIT: 1
# DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
# DOCKET_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
# branch_build_push_space:
# runs-on: ubuntu-20.04
# needs: [ branch_build_and_push ]
# steps:
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2.5.0
# - name: Login to Docker Hub
# uses: docker/login-action@v2.1.0
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Downloading Space Source Code
# uses: actions/download-artifact@v3
# with:
# name: space-src-code
# - name: Build and Push Space to Docker Hub
# uses: docker/build-push-action@v4.0.0
# with:
# context: .
# file: ./space/Dockerfile.space
# platforms: linux/amd64
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/plane-space-private:${{ needs.branch_build_and_push.outputs.gh_branch_name }}
# push: true
# env:
# DOCKER_BUILDKIT: 1
# DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
# DOCKET_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
# branch_build_push_backend:
# runs-on: ubuntu-20.04
# needs: [ branch_build_and_push ]
# steps:
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2.5.0
# - name: Login to Docker Hub
# uses: docker/login-action@v2.1.0
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Downloading Backend Source Code
# uses: actions/download-artifact@v3
# with:
# name: backend-src-code
# - name: Build and Push Backend to Docker Hub
# uses: docker/build-push-action@v4.0.0
# with:
# context: .
# file: ./Dockerfile.api
# platforms: linux/amd64
# push: true
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/plane-backend-private:${{ needs.branch_build_and_push.outputs.gh_branch_name }}
# env:
# DOCKER_BUILDKIT: 1
# DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
# DOCKET_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
branch_build_push_proxy:
runs-on: ubuntu-20.04
needs: [ branch_build_and_push ]
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.5.0
- name: Login to Docker Hub
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Downloading Proxy Source Code
uses: actions/download-artifact@v3
with:
name: proxy-src-code
- name: Build and Push Plane-Proxy to Docker Hub
uses: docker/build-push-action@v4.0.0
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
tags: ${{ secrets.DOCKERHUB_USERNAME }}/plane-proxy-private:${{ needs.branch_build_and_push.outputs.gh_branch_name }}
push: true
env:
DOCKER_BUILDKIT: 1
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKET_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}

4
.gitignore vendored
View File

@ -73,3 +73,7 @@ pnpm-lock.yaml
pnpm-workspace.yaml
.npmrc
.secrets
tmp/
## packages
dist