-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
92 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,3 +126,60 @@ jobs: | |
DOCKER_BUILDKIT: 1 | ||
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
full_build_push: | ||
runs-on: ubuntu-20.04 | ||
needs: [base_build_setup, full_base_build_push] | ||
env: | ||
AIO_BASE_TAG: ${{ needs.base_build_setup.outputs.image_tag }} | ||
AIO_IMAGE_TAGS: makeplane/plane-aio-app-full:${{ needs.base_build_setup.outputs.gh_branch_name }} | ||
TARGET_BRANCH: ${{ needs.base_build_setup.outputs.gh_branch_name }} | ||
BUILDX_DRIVER: ${{ needs.base_build_setup.outputs.gh_buildx_driver }} | ||
BUILDX_VERSION: ${{ needs.base_build_setup.outputs.gh_buildx_version }} | ||
BUILDX_PLATFORMS: ${{ needs.base_build_setup.outputs.gh_buildx_platforms }} | ||
BUILDX_ENDPOINT: ${{ needs.base_build_setup.outputs.gh_buildx_endpoint }} | ||
steps: | ||
- name: Set Docker Tag | ||
run: | | ||
if [ "${{ github.event_name }}" == "release" ]; then | ||
TAG=makeplane/plane-aio-app-full:stable | ||
elif [ "${{ env.TARGET_BRANCH }}" == "master" ]; then | ||
TAG=makeplane/plane-aio-app-full:latest | ||
else | ||
TAG=${{ env.AIO_IMAGE_TAGS }} | ||
fi | ||
echo "AIO_IMAGE_TAGS=${TAG}" >> $GITHUB_ENV | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
driver: ${{ env.BUILDX_DRIVER }} | ||
version: ${{ env.BUILDX_VERSION }} | ||
endpoint: ${{ env.BUILDX_ENDPOINT }} | ||
|
||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build and Push Frontend to Docker Container Registry | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
file: ./aio/Dockerfile-app | ||
platforms: ${{ env.BUILDX_PLATFORMS }} | ||
tags: ${{ env.AIO_IMAGE_TAGS }} | ||
push: true | ||
build-args: | ||
BUILD_TAG=${{ env.AIO_BASE_TAG }} | ||
BUILD_TYPE=full | ||
|
||
env: | ||
DOCKER_BUILDKIT: 1 | ||
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
#!/bin/bash | ||
|
||
if [ "$BUILD_TYPE" == "full" ]; then | ||
|
||
# Variables | ||
set -o allexport | ||
source plane.env set | ||
set +o allexport | ||
# Variables | ||
set -o allexport | ||
source plane.env set | ||
set +o allexport | ||
|
||
export PGHOST=localhost | ||
export PGHOST=localhost | ||
|
||
sudo -u postgres "/usr/lib/postgresql/${POSTGRES_VERSION}/bin/pg_ctl" -D /var/lib/postgresql/data start | ||
sudo -u postgres "/usr/lib/postgresql/${POSTGRES_VERSION}/bin/psql" --command "CREATE USER $POSTGRES_USER WITH SUPERUSER PASSWORD '$POSTGRES_PASSWORD';" && \ | ||
sudo -u postgres "/usr/lib/postgresql/${POSTGRES_VERSION}/bin/createdb" -O "$POSTGRES_USER" "$POSTGRES_DB" && \ | ||
sudo -u postgres "/usr/lib/postgresql/${POSTGRES_VERSION}/bin/pg_ctl" -D /var/lib/postgresql/data stop | ||
sudo -u postgres "/usr/lib/postgresql/${POSTGRES_VERSION}/bin/pg_ctl" -D /var/lib/postgresql/data start | ||
sudo -u postgres "/usr/lib/postgresql/${POSTGRES_VERSION}/bin/psql" --command "CREATE USER $POSTGRES_USER WITH SUPERUSER PASSWORD '$POSTGRES_PASSWORD';" && \ | ||
sudo -u postgres "/usr/lib/postgresql/${POSTGRES_VERSION}/bin/createdb" -O "$POSTGRES_USER" "$POSTGRES_DB" && \ | ||
sudo -u postgres "/usr/lib/postgresql/${POSTGRES_VERSION}/bin/pg_ctl" -D /var/lib/postgresql/data stop | ||
|
||
fi |