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