2021-10-31 05:32:58 +00:00
|
|
|
name: Build Stable
|
|
|
|
|
|
|
|
on:
|
2021-11-09 12:15:33 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
2021-11-26 14:22:17 +00:00
|
|
|
- .github/workflows/build_stable.yml
|
|
|
|
- .github/scripts/get-latest-tags.sh
|
2021-11-09 12:15:33 +00:00
|
|
|
- build/**
|
|
|
|
- installation/**
|
|
|
|
- tests/**
|
|
|
|
- .dockerignore
|
|
|
|
- docker-bake.hcl
|
2021-11-26 14:22:17 +00:00
|
|
|
- env-example
|
|
|
|
|
2021-10-31 05:32:58 +00:00
|
|
|
push:
|
2021-11-06 17:02:42 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
2021-11-26 14:22:17 +00:00
|
|
|
- .github/workflows/build_stable.yml
|
|
|
|
- .github/scripts/get-latest-tags.sh
|
2021-11-06 17:02:42 +00:00
|
|
|
- build/**
|
|
|
|
- installation/**
|
|
|
|
- tests/**
|
|
|
|
- .dockerignore
|
|
|
|
- docker-bake.hcl
|
2021-11-26 14:22:17 +00:00
|
|
|
- env-example
|
2021-10-31 05:32:58 +00:00
|
|
|
|
|
|
|
# Triggered from frappe/frappe and frappe/erpnext on releases
|
|
|
|
repository_dispatch:
|
|
|
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
2021-11-09 12:15:33 +00:00
|
|
|
env:
|
|
|
|
IS_AUTHORIZED_RUN: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
|
|
|
|
|
2021-10-31 05:32:58 +00:00
|
|
|
jobs:
|
2021-11-23 23:40:27 +00:00
|
|
|
build:
|
|
|
|
name: Frappe & ERPNext
|
2021-10-31 05:32:58 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
version: [12, 13]
|
2021-11-23 23:40:27 +00:00
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
image: registry:2
|
|
|
|
ports:
|
|
|
|
- 5000:5000
|
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
|
|
|
|
|
|
|
- name: Setup Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
2021-11-23 23:40:27 +00:00
|
|
|
with:
|
|
|
|
driver-opts: network=host
|
2021-11-04 12:31:49 +00:00
|
|
|
|
|
|
|
- name: Login
|
|
|
|
uses: docker/login-action@v1
|
2021-11-09 12:15:33 +00:00
|
|
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
2021-10-31 05:32:58 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
2021-11-04 12:31:49 +00:00
|
|
|
- name: Get latest versions
|
2021-11-06 18:07:39 +00:00
|
|
|
run: ./.github/scripts/get-latest-tags.sh
|
2021-10-31 05:32:58 +00:00
|
|
|
env:
|
|
|
|
VERSION: ${{ matrix.version }}
|
|
|
|
|
2021-11-23 23:40:27 +00:00
|
|
|
- name: Build Frappe
|
2022-02-16 06:05:23 +00:00
|
|
|
uses: docker/bake-action@v1.7.0
|
2021-10-31 05:32:58 +00:00
|
|
|
with:
|
|
|
|
files: docker-bake.hcl
|
2021-11-04 12:31:49 +00:00
|
|
|
targets: frappe-stable-test
|
2021-10-31 05:32:58 +00:00
|
|
|
load: true
|
|
|
|
|
2021-11-23 23:40:27 +00:00
|
|
|
- name: Push Frappe to local registry
|
2022-02-16 06:05:23 +00:00
|
|
|
uses: docker/bake-action@v1.7.0
|
2021-10-31 05:32:58 +00:00
|
|
|
with:
|
|
|
|
files: docker-bake.hcl
|
2021-11-23 23:40:27 +00:00
|
|
|
targets: frappe-stable-test-local
|
2021-11-06 17:02:42 +00:00
|
|
|
push: true
|
2021-10-31 05:32:58 +00:00
|
|
|
|
2021-11-23 23:40:27 +00:00
|
|
|
- name: Test Frappe
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
run: ./tests/test-frappe.sh
|
2021-11-04 12:31:49 +00:00
|
|
|
|
2021-11-23 23:40:27 +00:00
|
|
|
- name: Build ERPNext
|
2022-02-16 06:05:23 +00:00
|
|
|
uses: docker/bake-action@v1.7.0
|
2021-11-04 12:31:49 +00:00
|
|
|
with:
|
2021-11-23 23:40:27 +00:00
|
|
|
files: docker-bake.hcl
|
|
|
|
targets: erpnext-stable-test
|
|
|
|
load: true
|
2021-11-04 12:31:49 +00:00
|
|
|
|
2021-11-23 23:40:27 +00:00
|
|
|
- name: Test ERPNext
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
run: ./tests/test-erpnext.sh
|
2021-10-31 05:32:58 +00:00
|
|
|
|
2021-11-23 23:40:27 +00:00
|
|
|
- name: Push Frappe
|
|
|
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
2022-02-16 06:05:23 +00:00
|
|
|
uses: docker/bake-action@v1.7.0
|
2021-10-31 05:32:58 +00:00
|
|
|
with:
|
|
|
|
files: docker-bake.hcl
|
2021-11-23 23:40:27 +00:00
|
|
|
targets: frappe-stable
|
|
|
|
push: true
|
|
|
|
env:
|
|
|
|
GIT_TAG: ${{ env.FRAPPE_VERSION }}
|
2021-10-31 05:32:58 +00:00
|
|
|
|
2021-11-23 23:40:27 +00:00
|
|
|
- name: Push ERPNext
|
2021-11-09 12:15:33 +00:00
|
|
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
2022-02-16 06:05:23 +00:00
|
|
|
uses: docker/bake-action@v1.7.0
|
2021-10-31 05:32:58 +00:00
|
|
|
with:
|
|
|
|
files: docker-bake.hcl
|
|
|
|
targets: erpnext-stable
|
2021-11-06 17:02:42 +00:00
|
|
|
push: true
|
2021-11-06 18:07:39 +00:00
|
|
|
env:
|
|
|
|
GIT_TAG: ${{ env.ERPNEXT_VERSION }}
|
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
|
2021-11-09 12:15:33 +00:00
|
|
|
if: github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request'
|
2021-11-23 23:40:27 +00:00
|
|
|
needs: build
|
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
|