forked from github/plane
wip
This commit is contained in:
parent
9cf171c099
commit
3668b1cc16
176
.github/workflows/build-branch.yml
vendored
176
.github/workflows/build-branch.yml
vendored
@ -18,7 +18,8 @@ on:
|
||||
|
||||
env:
|
||||
gh_branch: ${{ github.ref_name }}
|
||||
img_tag: latest
|
||||
gh_t_branch: ${{ github.event.pull_request.base.ref }}
|
||||
|
||||
|
||||
jobs:
|
||||
branch_build_and_push:
|
||||
@ -29,11 +30,20 @@ jobs:
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v3.3.0
|
||||
|
||||
- name: Set Environment Variable
|
||||
run: |
|
||||
if [ ${{ github.event_name }} == 'pull_request' ] && [ ${{github.event.action}} == 'closed' ] ; then
|
||||
echo "::set-env name=TRG_BRANCH::${{github.event.pull_request.base.ref}}"
|
||||
else
|
||||
echo "::set-env name=TRG_BRANCH::${{github.ref_name}}"
|
||||
fi
|
||||
|
||||
- uses: ASzc/change-string-case-action@v2
|
||||
id: gh_branch_upper_lower
|
||||
with:
|
||||
string: ${{ env.gh_branch }}
|
||||
string: $TRG_BRANCH
|
||||
# string: ${{ env.gh_branch }}
|
||||
|
||||
- uses: mad9000/actions-find-and-replace-string@2
|
||||
id: gh_branch_replace_slash
|
||||
@ -89,95 +99,95 @@ jobs:
|
||||
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
|
||||
# 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: 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 }}
|
||||
# - 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
|
||||
# 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: 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 }}
|
||||
# - 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
|
||||
# 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: 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 }}
|
||||
# - 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
|
||||
|
Loading…
Reference in New Issue
Block a user