mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-09-20 02:59:02 +00:00
5254e2aad3
* ci(Test): Add `workflow_dispatch` trigger * ci(Test): Build and run on push and pr * test: Set failfast, remove ERPNext reference * test: Reveal .env file for logs * ci(Test): Rename step * ci(Test): Fix git tag * test: Add -x flag for debugging * test: Fix failing test * ci(Test): Check if built images are used * ci(Test): Configure trigger paths, don't build on schedule * test: Remove bug * ci: Build and test stable images on PR * fix(frappe-nginx): Get back to `ls` from `find` * check if test passes with erpnext images * fix(frappe-worker): Default sites in backup command * get integration test changes back * chore: Fix linting
148 lines
3.4 KiB
YAML
148 lines
3.4 KiB
YAML
name: Build Stable
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- .github/**
|
|
- build/**
|
|
- installation/**
|
|
- tests/**
|
|
- .dockerignore
|
|
- docker-bake.hcl
|
|
- docker-compose.yml
|
|
- env*
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- .github/**
|
|
- build/**
|
|
- installation/**
|
|
- tests/**
|
|
- .dockerignore
|
|
- docker-bake.hcl
|
|
- docker-compose.yml
|
|
- env*
|
|
|
|
# Triggered from frappe/frappe and frappe/erpnext on releases
|
|
repository_dispatch:
|
|
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
IS_AUTHORIZED_RUN: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
|
|
|
|
jobs:
|
|
build_frappe:
|
|
name: Frappe
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
version: [12, 13]
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Login
|
|
uses: docker/login-action@v1
|
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Get latest versions
|
|
run: ./.github/scripts/get-latest-tags.sh
|
|
env:
|
|
VERSION: ${{ matrix.version }}
|
|
|
|
- name: Build
|
|
uses: docker/bake-action@v1.6.0
|
|
with:
|
|
files: docker-bake.hcl
|
|
targets: frappe-stable-test
|
|
load: true
|
|
|
|
- name: Test
|
|
run: ./tests/test-frappe.sh
|
|
|
|
- name: Push
|
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
|
uses: docker/bake-action@v1.6.0
|
|
with:
|
|
files: docker-bake.hcl
|
|
targets: frappe-stable
|
|
push: true
|
|
env:
|
|
GIT_TAG: ${{ env.FRAPPE_VERSION }}
|
|
|
|
build_erpnext:
|
|
name: ERPNext
|
|
runs-on: ubuntu-latest
|
|
needs: build_frappe
|
|
strategy:
|
|
matrix:
|
|
version: [12, 13]
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Login
|
|
uses: docker/login-action@v1
|
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Get latest versions
|
|
run: ./.github/scripts/get-latest-tags.sh
|
|
env:
|
|
VERSION: ${{ matrix.version }}
|
|
|
|
- name: Build
|
|
uses: docker/bake-action@v1.6.0
|
|
with:
|
|
files: docker-bake.hcl
|
|
targets: erpnext-stable-test
|
|
load: true
|
|
|
|
- name: Test
|
|
run: ./tests/test-erpnext.sh
|
|
|
|
- name: Push
|
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
|
uses: docker/bake-action@v1.6.0
|
|
with:
|
|
files: docker-bake.hcl
|
|
targets: erpnext-stable
|
|
push: true
|
|
env:
|
|
GIT_TAG: ${{ env.ERPNEXT_VERSION }}
|
|
|
|
release_helm:
|
|
name: Release Helm
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request'
|
|
needs: [build_frappe, build_erpnext]
|
|
|
|
steps:
|
|
- name: Setup deploy key
|
|
uses: webfactory/ssh-agent@v0.5.3
|
|
with:
|
|
ssh-private-key: ${{ secrets.HELM_DEPLOY_KEY }}
|
|
|
|
- name: Release
|
|
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
|