mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-23 16:25:09 +00:00
92 lines
3.4 KiB
YAML
92 lines
3.4 KiB
YAML
name: setup site base on provided image build for branch specified
|
|
|
|
on:
|
|
# workflow_dispatch:
|
|
pull_request:
|
|
types: [ reopened]
|
|
branches: [main]
|
|
|
|
jobs:
|
|
|
|
job-image-build:
|
|
runs-on:
|
|
- self-hosted
|
|
# steps:
|
|
# # extract branch name
|
|
# - name: Extract branch name
|
|
# if: github.event_name != 'pull_request'
|
|
# shell: bash
|
|
# run: echo "::set-env name=BRANCH_NAME::$(echo ${GITHUB_REF#refs/heads/})"
|
|
# id: extract_branch
|
|
|
|
# # extract branch name on pull request
|
|
# - name: Print branch name
|
|
# if: github.event_name == 'pull_request'
|
|
# run: echo "::set-env name=BRANCH_NAME::$(echo ${GITHUB_HEAD_REF})"
|
|
|
|
# # print branch name
|
|
# - name: Get branch name
|
|
# run: echo 'The branch name is' $BRANCH_NAME
|
|
|
|
# setup_sites:
|
|
# runs-on:
|
|
# - self-hosted
|
|
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
- name: Create the site
|
|
run: |
|
|
docker-compose --project-name ${{ github.event.pull_request.head.ref }} exec backend \
|
|
bench new-site --no-mariadb-socket --admin-password=${{ vars.MARIADB_PASSWORD }} --db-root-password=${{ vars.MARIADB_PASSWORD }} --install-app erpnext --set-default ${{ github.event.pull_request.head.ref }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# - name: Create first bench
|
|
# run: |
|
|
# echo 'The branch name is' $BRANCH_NAME
|
|
# cp example.env ~/gitopss/erpnext-one.env
|
|
# sed -i 's/DB_PASSWORD=123/DB_PASSWORD=fintech2023/g' ~/gitopss/erpnext-one.env
|
|
# sed -i 's/DB_HOST=/DB_HOST=mariadb-database/g' ~/gitopss/erpnext-one.env
|
|
# sed -i 's/DB_PORT=/DB_PORT=3306/g' ~/gitopss/erpnext-one.env
|
|
# sed -i 's/SITES=`erp.fintechsys.net`/SITES=\`agent.fintechsys.net\`/g' ~/gitopss/erpnext-one.env
|
|
# echo 'ROUTER=erpnext-one' >> ~/gitopss/erpnext-one.env
|
|
# echo "BENCH_NETWORK=erpnext-one" >> ~/gitopss/erpnext-one.env
|
|
|
|
# - name: Create a yaml file to deploy container
|
|
# run: |
|
|
# docker compose --project-name erpnext-one \
|
|
# --env-file ~/gitopss/erpnext-one.env \
|
|
# -f compose.yaml \
|
|
# -f overrides/compose.redis.yaml \
|
|
# -f overrides/compose.multi-bench.yaml \
|
|
# -f overrides/compose.multi-bench-ssl.yaml config > ~/gitopss/erpnext-one.yaml
|
|
|
|
|
|
# - name: Deploy the container
|
|
# run: |
|
|
# docker compose --project-name erpnext-one -f ~/gitopss/erpnext-one.yaml up -d
|
|
|
|
|
|
# - name: Create the site
|
|
# run: |
|
|
# docker compose --project-name erpnext-one exec -T backend \
|
|
# bench new-site --no-mariadb-socket --mariadb-root-password fintech2023 --install-app hrms --set-default \
|
|
# --install-app rule_management --install-app remittance_base --install-app remittance --install-app bulk_remittance --install-app remittance_stellar_integration \
|
|
# --install-app client_account_management --install-app teller_for_erpnext --install-app teller_for_agent \
|
|
# --install-app remittance_agent_service --install-app payment_management --install-app bank_services --install-app remittance_customize \
|
|
# --install-app remittance_network_manager --install-app erpnext_theme --install-app remittance_website --admin-password fintech2023 agent.fintechsys.net
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|