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:
|
2022-03-14 05:53:03 +00:00
|
|
|
- images/nginx/**
|
|
|
|
- images/socketio/**
|
|
|
|
- images/worker/**
|
|
|
|
- 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:
|
2022-03-14 05:53:03 +00:00
|
|
|
- images/nginx/**
|
|
|
|
- images/socketio/**
|
|
|
|
- images/worker/**
|
|
|
|
- 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
|
|
|
v12:
|
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
|
2022-04-03 10:27:22 +00:00
|
|
|
version: "12"
|
2022-03-14 05:53:03 +00:00
|
|
|
push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
|
2022-04-03 13:18:36 +00:00
|
|
|
platforms: linux/amd64
|
2022-03-14 05:53:03 +00:00
|
|
|
secrets:
|
|
|
|
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
|
|
|
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' }}
|
2022-04-03 13:18:36 +00:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2022-03-14 05:53:03 +00:00
|
|
|
secrets:
|
|
|
|
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
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' }}
|
|
|
|
needs: v13
|
|
|
|
|
2021-10-31 05:32:58 +00:00
|
|
|
steps:
|
2021-11-04 12:31:49 +00:00
|
|
|
- name: Checkout
|
2022-03-04 19:35:27 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-11-04 12:31:49 +00:00
|
|
|
|
2022-03-14 05:53:03 +00:00
|
|
|
- name: Setup Python
|
2022-03-14 09:57:30 +00:00
|
|
|
uses: actions/setup-python@v3
|
2021-10-31 05:32:58 +00:00
|
|
|
with:
|
2022-03-14 05:53:03 +00:00
|
|
|
python-version: 3.9
|
2021-10-31 05:32:58 +00:00
|
|
|
|
2021-11-04 12:31:49 +00:00
|
|
|
- name: Get latest versions
|
2022-03-14 05:53:03 +00:00
|
|
|
run: python3 ./.github/scripts/get_latest_tags.py --repo erpnext --version 13
|
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' }}
|
|
|
|
needs: v13
|
2021-11-04 12:31:49 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Setup deploy key
|
2021-11-22 10:06:05 +00:00
|
|
|
uses: webfactory/ssh-agent@v0.5.4
|
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
|
|
|
|
./release_wizard/wizard 13 patch --remote origin --ci
|