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:
|
|
|
|
- .github/**
|
|
|
|
- build/**
|
|
|
|
- installation/**
|
|
|
|
- tests/**
|
|
|
|
- .dockerignore
|
|
|
|
- docker-bake.hcl
|
|
|
|
- docker-compose.yml
|
|
|
|
- env*
|
2021-10-31 05:32:58 +00:00
|
|
|
push:
|
2021-11-06 17:02:42 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths:
|
|
|
|
- .github/**
|
|
|
|
- build/**
|
|
|
|
- installation/**
|
|
|
|
- tests/**
|
|
|
|
- .dockerignore
|
|
|
|
- docker-bake.hcl
|
|
|
|
- docker-compose.yml
|
|
|
|
- env*
|
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-04 12:31:49 +00:00
|
|
|
build_frappe:
|
|
|
|
name: Frappe
|
2021-10-31 05:32:58 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
version: [12, 13]
|
|
|
|
|
|
|
|
steps:
|
2021-11-04 12:31:49 +00:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
|
|
|
|
- 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-04 12:31:49 +00:00
|
|
|
- name: Build
|
2021-10-31 05:32:58 +00:00
|
|
|
uses: docker/bake-action@v1.6.0
|
|
|
|
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-04 12:31:49 +00:00
|
|
|
- name: Push
|
2021-11-09 12:15:33 +00:00
|
|
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
2021-10-31 05:32:58 +00:00
|
|
|
uses: docker/bake-action@v1.6.0
|
|
|
|
with:
|
|
|
|
files: docker-bake.hcl
|
2021-11-04 12:31:49 +00:00
|
|
|
targets: frappe-stable
|
2021-11-06 17:02:42 +00:00
|
|
|
push: true
|
2021-11-06 18:07:39 +00:00
|
|
|
env:
|
|
|
|
GIT_TAG: ${{ env.FRAPPE_VERSION }}
|
2021-10-31 05:32:58 +00:00
|
|
|
|
2021-11-04 12:31:49 +00:00
|
|
|
build_erpnext:
|
|
|
|
name: ERPNext
|
|
|
|
runs-on: ubuntu-latest
|
2021-11-06 17:02:42 +00:00
|
|
|
needs: build_frappe
|
2021-11-04 12:31:49 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
version: [12, 13]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2021-10-31 05:32:58 +00:00
|
|
|
|
2021-11-04 12:31:49 +00:00
|
|
|
- name: Setup Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
|
|
|
|
- name: Login
|
|
|
|
uses: docker/login-action@v1
|
2021-11-09 12:15:33 +00:00
|
|
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
2021-11-04 12:31:49 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
|
|
|
- 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-04 12:31:49 +00:00
|
|
|
- name: Build
|
2021-10-31 05:32:58 +00:00
|
|
|
uses: docker/bake-action@v1.6.0
|
|
|
|
with:
|
|
|
|
files: docker-bake.hcl
|
2021-11-04 12:31:49 +00:00
|
|
|
targets: erpnext-stable-test
|
|
|
|
load: true
|
2021-10-31 05:32:58 +00:00
|
|
|
|
2021-11-04 12:31:49 +00:00
|
|
|
- name: Push
|
2021-11-09 12:15:33 +00:00
|
|
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
2021-10-31 05:32:58 +00:00
|
|
|
uses: docker/bake-action@v1.6.0
|
|
|
|
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-04 12:31:49 +00:00
|
|
|
needs: [build_frappe, build_erpnext]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Setup deploy key
|
2021-10-31 05:32:58 +00:00
|
|
|
uses: webfactory/ssh-agent@v0.5.3
|
|
|
|
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
|