2022-03-14 08:53:03 +03:00
|
|
|
name: Stable build
|
2021-10-31 08:32:58 +03:00
|
|
|
|
|
|
|
on:
|
2021-11-09 15:15:33 +03:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
2023-01-17 17:12:27 +05:30
|
|
|
- images/production/**
|
2022-03-14 08:53:03 +03:00
|
|
|
- overrides/**
|
2021-11-09 15:15:33 +03:00
|
|
|
- tests/**
|
2022-03-14 08:53:03 +03:00
|
|
|
- compose.yaml
|
2021-11-09 15:15:33 +03:00
|
|
|
- docker-bake.hcl
|
2022-03-14 08:53:03 +03:00
|
|
|
- example.env
|
2022-03-14 13:20:39 +03:00
|
|
|
- .github/workflows/build_stable.yml
|
2021-11-26 17:22:17 +03:00
|
|
|
|
2021-10-31 08:32:58 +03:00
|
|
|
push:
|
2021-11-06 20:02:42 +03:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
2023-01-17 17:12:27 +05:30
|
|
|
- images/production/**
|
2022-03-14 08:53:03 +03:00
|
|
|
- overrides/**
|
2021-11-06 20:02:42 +03:00
|
|
|
- tests/**
|
2022-03-14 08:53:03 +03:00
|
|
|
- compose.yaml
|
2021-11-06 20:02:42 +03:00
|
|
|
- docker-bake.hcl
|
2022-03-14 08:53:03 +03:00
|
|
|
- example.env
|
2021-10-31 08:32:58 +03:00
|
|
|
|
|
|
|
# Triggered from frappe/frappe and frappe/erpnext on releases
|
|
|
|
repository_dispatch:
|
|
|
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
2023-10-20 18:40:10 +05:30
|
|
|
v14:
|
2022-04-04 12:36:30 +03:00
|
|
|
uses: ./.github/workflows/docker-build-push.yml
|
2022-03-14 08:53:03 +03:00
|
|
|
with:
|
|
|
|
repo: erpnext
|
2023-10-20 18:40:10 +05:30
|
|
|
version: "14"
|
2022-03-14 08:53:03 +03:00
|
|
|
push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
|
2023-10-20 18:40:10 +05:30
|
|
|
python_version: 3.10.13
|
|
|
|
node_version: 16.20.2
|
2022-03-14 08:53:03 +03:00
|
|
|
secrets:
|
|
|
|
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
2022-04-06 12:44:39 +05:30
|
|
|
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
2023-10-20 18:40:10 +05:30
|
|
|
v15:
|
2022-04-06 12:44:39 +05:30
|
|
|
uses: ./.github/workflows/docker-build-push.yml
|
|
|
|
with:
|
|
|
|
repo: erpnext
|
2023-10-20 18:40:10 +05:30
|
|
|
version: "15"
|
2022-04-06 12:44:39 +05:30
|
|
|
push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
|
2023-10-20 18:40:10 +05:30
|
|
|
python_version: 3.11.6
|
|
|
|
node_version: 18.18.2
|
2022-04-06 12:44:39 +05:30
|
|
|
secrets:
|
|
|
|
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
2022-03-14 08:53:03 +03:00
|
|
|
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
2022-04-04 15:02:08 +05:30
|
|
|
update_versions:
|
|
|
|
name: Update example.env and pwd.yml
|
2021-10-31 08:32:58 +03:00
|
|
|
runs-on: ubuntu-latest
|
2022-03-14 08:53:03 +03:00
|
|
|
if: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
|
2023-10-20 18:40:10 +05:30
|
|
|
needs: v15
|
2022-03-14 08:53:03 +03:00
|
|
|
|
2021-10-31 08:32:58 +03:00
|
|
|
steps:
|
2021-11-04 15:31:49 +03:00
|
|
|
- name: Checkout
|
2023-09-06 03:24:07 +05:30
|
|
|
uses: actions/checkout@v4
|
2021-11-04 15:31:49 +03:00
|
|
|
|
2022-03-14 08:53:03 +03:00
|
|
|
- name: Setup Python
|
2023-12-07 14:15:08 +05:30
|
|
|
uses: actions/setup-python@v5
|
2021-10-31 08:32:58 +03:00
|
|
|
with:
|
2022-07-03 15:09:10 +05:30
|
|
|
python-version: "3.10"
|
2021-10-31 08:32:58 +03:00
|
|
|
|
2021-11-04 15:31:49 +03:00
|
|
|
- name: Get latest versions
|
2023-10-20 18:40:10 +05:30
|
|
|
run: python3 ./.github/scripts/get_latest_tags.py --repo erpnext --version 15
|
2021-11-04 15:31:49 +03:00
|
|
|
|
2022-03-14 08:53:03 +03:00
|
|
|
- name: Update
|
2022-04-04 15:02:08 +05:30
|
|
|
run: |
|
|
|
|
python3 ./.github/scripts/update_example_env.py
|
|
|
|
python3 ./.github/scripts/update_pwd.py
|
2021-10-31 08:32:58 +03:00
|
|
|
|
2022-03-14 08:53:03 +03:00
|
|
|
- name: Push
|
|
|
|
run: |
|
|
|
|
git config --global user.name github-actions
|
|
|
|
git config --global user.email github-actions@github.com
|
2022-04-04 15:02:08 +05:30
|
|
|
git add example.env pwd.yml
|
2022-03-14 08:53:03 +03:00
|
|
|
if [ -z "$(git status --porcelain)" ]; then
|
2022-04-04 15:02:08 +05:30
|
|
|
echo "versions did not change, exiting."
|
2022-03-14 08:53:03 +03:00
|
|
|
exit 0
|
|
|
|
else
|
2022-04-04 15:02:08 +05:30
|
|
|
echo "version changed, pushing changes..."
|
2022-03-14 08:53:03 +03:00
|
|
|
git commit -m "chore: Update example.env"
|
2022-03-24 10:11:48 +03:00
|
|
|
git pull --rebase
|
2022-03-14 08:53:03 +03:00
|
|
|
git push origin main
|
|
|
|
fi
|
2021-10-31 08:32:58 +03:00
|
|
|
|
2021-11-04 15:31:49 +03:00
|
|
|
release_helm:
|
|
|
|
name: Release Helm
|
|
|
|
runs-on: ubuntu-latest
|
2022-03-14 08:53:03 +03:00
|
|
|
if: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
|
2023-10-20 18:40:10 +05:30
|
|
|
needs: v15
|
2021-11-04 15:31:49 +03:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Setup deploy key
|
2023-03-27 18:55:50 +05:30
|
|
|
uses: webfactory/ssh-agent@v0.8.0
|
2021-10-31 08:32:58 +03:00
|
|
|
with:
|
|
|
|
ssh-private-key: ${{ secrets.HELM_DEPLOY_KEY }}
|
|
|
|
|
2021-11-10 21:42:19 +05:30
|
|
|
- name: Setup Git Credentials
|
2021-11-11 06:30:33 +05:30
|
|
|
run: |
|
|
|
|
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
|
|
git config --global user.name "github-actions[bot]"
|
2021-11-10 21:42:19 +05:30
|
|
|
|
2021-11-04 15:31:49 +03:00
|
|
|
- name: Release
|
2021-10-31 08:32:58 +03:00
|
|
|
run: |
|
|
|
|
git clone git@github.com:frappe/helm.git && cd helm
|
|
|
|
pip install -r release_wizard/requirements.txt
|
2023-10-20 18:40:10 +05:30
|
|
|
./release_wizard/wizard 15 patch --remote origin --ci
|