mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
[chore] Fixed Github Workflows for Building and Pushing, frontend, backend, proxy & plane-deploy (#1959)
* chore: modified frontend github workflow * chore: modified backend github workflows * chore: added github workflow for build and push for plane-deploy * chore: added github workflow for plane-proxy
This commit is contained in:
parent
ab4a17c178
commit
fe1b0c1d73
68
.github/workflows/push-image-backend.yml
vendored
68
.github/workflows/push-image-backend.yml
vendored
@ -1,12 +1,11 @@
|
|||||||
name: Build and Push Backend Docker Image
|
name: Build and Push Backend Docker Image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
pull_request:
|
||||||
branches:
|
types: [closed]
|
||||||
- 'develop'
|
branches: [develop]
|
||||||
- 'master'
|
release:
|
||||||
tags:
|
types: [released]
|
||||||
- '*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_push_backend:
|
build_push_backend:
|
||||||
@ -17,61 +16,42 @@ jobs:
|
|||||||
- name: Check out the repo
|
- name: Check out the repo
|
||||||
uses: actions/checkout@v3.3.0
|
uses: actions/checkout@v3.3.0
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v2.1.0
|
|
||||||
with:
|
|
||||||
platforms: linux/arm64,linux/amd64
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2.5.0
|
uses: docker/setup-buildx-action@v2.5.0
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
|
||||||
uses: docker/login-action@v2.1.0
|
|
||||||
with:
|
|
||||||
registry: "ghcr.io"
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v2.1.0
|
uses: docker/login-action@v2.1.0
|
||||||
with:
|
with:
|
||||||
registry: "registry.hub.docker.com"
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels) for Docker (Docker Hub)
|
- name: Extract metadata (tags, labels) for Docker (Docker Hub) from Github Pull Request
|
||||||
id: ghmeta
|
id: meta_pr
|
||||||
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
uses: docker/metadata-action@v4.3.0
|
uses: docker/metadata-action@v4.3.0
|
||||||
with:
|
with:
|
||||||
images: makeplane/plane-backend
|
images: ${{ secrets.DOCKERHUB_USERNAME }}/plane-backend
|
||||||
|
tags: type=raw,value=develop
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels) for Docker (Github)
|
- name: Extract metadata (tags, labels) for Docker (Docker Hub) from Github Release
|
||||||
id: dkrmeta
|
id: meta
|
||||||
uses: docker/metadata-action@v4.3.0
|
uses: docker/metadata-action@v4.3.0
|
||||||
|
if: ${{ github.event_name == 'release' }}
|
||||||
with:
|
with:
|
||||||
images: ghcr.io/${{ github.repository }}-backend
|
images: ${{ secrets.DOCKERHUB_USERNAME }}/plane-backend
|
||||||
|
tags: |
|
||||||
- name: Build and Push to GitHub Container Registry
|
type=ref,event=tag
|
||||||
uses: docker/build-push-action@v4.0.0
|
|
||||||
with:
|
|
||||||
context: ./apiserver
|
|
||||||
file: ./apiserver/Dockerfile.api
|
|
||||||
platforms: linux/arm64,linux/amd64
|
|
||||||
push: true
|
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha
|
|
||||||
tags: ${{ steps.ghmeta.outputs.tags }}
|
|
||||||
labels: ${{ steps.ghmeta.outputs.labels }}
|
|
||||||
|
|
||||||
- name: Build and Push to Docker Hub
|
- name: Build and Push to Docker Hub
|
||||||
uses: docker/build-push-action@v4.0.0
|
uses: docker/build-push-action@v4.0.0
|
||||||
with:
|
with:
|
||||||
context: ./apiserver
|
context: ./apiserver
|
||||||
file: ./apiserver/Dockerfile.api
|
file: ./apiserver/Dockerfile.api
|
||||||
platforms: linux/arm64,linux/amd64
|
platforms: linux/amd64
|
||||||
push: true
|
push: true
|
||||||
cache-from: type=gha
|
tags: ${{ github.event_name == 'release' && steps.meta.outputs.tags || steps.meta_pr.outputs.tags }}
|
||||||
cache-to: type=gha
|
env:
|
||||||
tags: ${{ steps.dkrmeta.outputs.tags }}
|
DOCKER_BUILDKIT: 1
|
||||||
labels: ${{ steps.dkrmeta.outputs.labels }}
|
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
DOCKET_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
57
.github/workflows/push-image-deploy.yml
vendored
Normal file
57
.github/workflows/push-image-deploy.yml
vendored
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
name: Build and Push Plane Deploy Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [closed]
|
||||||
|
branches: [develop]
|
||||||
|
release:
|
||||||
|
types: [released]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_push_plane_deploy:
|
||||||
|
name: Build and Push Plane Deploy Docker Image
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out the repo
|
||||||
|
uses: actions/checkout@v3.3.0
|
||||||
|
|
||||||
|
- 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: Extract metadata (tags, labels) for Docker (Docker Hub) from Github Pull Request
|
||||||
|
id: meta_pr
|
||||||
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
uses: docker/metadata-action@v4.3.0
|
||||||
|
with:
|
||||||
|
images: ${{ secrets.DOCKERHUB_USERNAME }}/plane-deploy
|
||||||
|
tags: type=raw,value=develop
|
||||||
|
|
||||||
|
- name: Extract metadata (tags, labels) for Docker (Docker Hub) from Github Release
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v4.3.0
|
||||||
|
if: ${{ github.event_name == 'release' }}
|
||||||
|
with:
|
||||||
|
images: ${{ secrets.DOCKERHUB_USERNAME }}/plane-deploy
|
||||||
|
tags: |
|
||||||
|
type=ref,event=tag
|
||||||
|
|
||||||
|
- name: Build and Push to Docker Hub
|
||||||
|
uses: docker/build-push-action@v4.0.0
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./apps/space/Dockerfile.space
|
||||||
|
platforms: linux/amd64
|
||||||
|
push: true
|
||||||
|
tags: ${{ github.event_name == 'release' && steps.meta.outputs.tags || steps.meta_pr.outputs.tags }}
|
||||||
|
env:
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
|
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
DOCKET_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
71
.github/workflows/push-image-frontend.yml
vendored
71
.github/workflows/push-image-frontend.yml
vendored
@ -1,77 +1,60 @@
|
|||||||
name: Build and Push Frontend Docker Image
|
name: Build and Push Frontend Docker Image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
pull_request:
|
||||||
branches:
|
types: [closed]
|
||||||
- 'develop'
|
branches: [develop]
|
||||||
- 'master'
|
release:
|
||||||
tags:
|
types: [released]
|
||||||
- '*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_push_frontend:
|
build_push_frontend:
|
||||||
name: Build Frontend Docker Image
|
name: Build Frontend 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 up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v2.1.0
|
|
||||||
with:
|
|
||||||
platforms: linux/arm64,linux/amd64
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2.5.0
|
uses: docker/setup-buildx-action@v2.5.0
|
||||||
|
|
||||||
- name: Login to Github Container Registry
|
- name: Setup .npmrc for repository
|
||||||
uses: docker/login-action@v2.1.0
|
run: |
|
||||||
with:
|
echo -e "@tiptap-pro:registry=https://registry.tiptap.dev/\n//registry.tiptap.dev/:_authToken=${{ secrets.TIPTAP_TOKEN }}" > .npmrc
|
||||||
registry: "ghcr.io"
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v2.1.0
|
uses: docker/login-action@v2.1.0
|
||||||
with:
|
with:
|
||||||
registry: "registry.hub.docker.com"
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels) for Docker (Docker Hub)
|
|
||||||
id: ghmeta
|
|
||||||
uses: docker/metadata-action@v4.3.0
|
|
||||||
with:
|
|
||||||
images: makeplane/plane-frontend
|
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels) for Docker (Github)
|
- name: Extract metadata (tags, labels) for Docker (Docker Hub) from Github Release
|
||||||
id: meta
|
id: meta
|
||||||
|
if: ${{ github.event_name == 'release' }}
|
||||||
uses: docker/metadata-action@v4.3.0
|
uses: docker/metadata-action@v4.3.0
|
||||||
with:
|
with:
|
||||||
images: ghcr.io/${{ github.repository }}-frontend
|
images: ${{ secrets.DOCKERHUB_USERNAME }}/plane-frontend
|
||||||
|
tags: |
|
||||||
|
type=ref,event=tag
|
||||||
|
|
||||||
- name: Build and Push to GitHub Container Registry
|
- name: Extract metadata (tags, labels) for Docker (Docker Hub) from Github Pull Request
|
||||||
uses: docker/build-push-action@v4.0.0
|
id: meta_pr
|
||||||
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
uses: docker/metadata-action@v4.3.0
|
||||||
with:
|
with:
|
||||||
context: .
|
images: ${{ secrets.DOCKERHUB_USERNAME }}/plane-frontend
|
||||||
file: ./apps/app/Dockerfile.web
|
tags: type=raw,value=develop
|
||||||
platforms: linux/arm64,linux/amd64
|
|
||||||
push: true
|
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha
|
|
||||||
tags: ${{ steps.ghmeta.outputs.tags }}
|
|
||||||
labels: ${{ steps.ghmeta.outputs.labels }}
|
|
||||||
|
|
||||||
- name: Build and Push to Docker Container Registry
|
- name: Build and Push to Docker Container Registry
|
||||||
uses: docker/build-push-action@v4.0.0
|
uses: docker/build-push-action@v4.0.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./apps/app/Dockerfile.web
|
file: ./apps/app/Dockerfile.web
|
||||||
platforms: linux/arm64,linux/amd64
|
platforms: linux/amd64
|
||||||
|
tags: ${{ github.event_name == 'release' && steps.meta.outputs.tags || steps.meta_pr.outputs.tags }}
|
||||||
push: true
|
push: true
|
||||||
cache-from: type=gha
|
env:
|
||||||
cache-to: type=gha
|
DOCKER_BUILDKIT: 1
|
||||||
tags: ${{ steps.dkrmeta.outputs.tags }}
|
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
labels: ${{ steps.dkrmeta.outputs.labels }}
|
DOCKET_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
56
.github/workflows/push-image-proxy.yml
vendored
Normal file
56
.github/workflows/push-image-proxy.yml
vendored
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
name: Build and Push Proxy Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [closed]
|
||||||
|
branches: [develop]
|
||||||
|
release:
|
||||||
|
types: [released]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_push_proxy:
|
||||||
|
name: Build and Push Proxy Docker Image
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out the repo
|
||||||
|
uses: actions/checkout@v3.3.0
|
||||||
|
|
||||||
|
- 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: Extract metadata (tags, labels) for Docker (Docker Hub) from Github Pull Request
|
||||||
|
id: meta_pr
|
||||||
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
uses: docker/metadata-action@v4.3.0
|
||||||
|
with:
|
||||||
|
images: ${{ secrets.DOCKERHUB_USERNAME }}/plane-proxy
|
||||||
|
tags: type=raw,value=develop
|
||||||
|
|
||||||
|
- name: Extract metadata (tags, labels) for Docker (Docker Hub) from Github Release
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v4.3.0
|
||||||
|
if: ${{ github.event_name == 'release' }}
|
||||||
|
with:
|
||||||
|
images: ${{ secrets.DOCKERHUB_USERNAME }}/plane-proxy
|
||||||
|
tags: |
|
||||||
|
type=ref,event=tag
|
||||||
|
|
||||||
|
- name: Build and Push to Docker Hub
|
||||||
|
uses: docker/build-push-action@v4.0.0
|
||||||
|
with:
|
||||||
|
context: ./nginx
|
||||||
|
file: ./nginx/Dockerfile
|
||||||
|
platforms: linux/amd64
|
||||||
|
push: true
|
||||||
|
tags: ${{ github.event_name == 'release' && steps.meta.outputs.tags || steps.meta_pr.outputs.tags }}
|
||||||
|
env:
|
||||||
|
DOCKER_BUILDKIT: 1
|
||||||
|
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
DOCKET_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
|
Loading…
Reference in New Issue
Block a user