2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-14 00:54:07 +00:00
frappe_docker/.github/workflows/build_stable.yml
2021-11-04 19:00:16 +03:00

82 lines
2.1 KiB
YAML

name: Build Stable
on:
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:
jobs:
build:
name: Frappe and ERPNext images
runs-on: ubuntu-latest
strategy:
matrix:
version: [12, 13]
steps:
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
if: github.repository == 'frappe/frappe_docker'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup Frappe variables
run: ./.github/scripts/get-latest-tag.sh
env:
REPO: frappe/frappe
VERSION: ${{ matrix.version }}
- name: Build Frappe images
uses: docker/bake-action@v1.6.0
with:
files: docker-bake.hcl
targets: frappe-stable
push: true
- name: Setup ERPNext variables
run: ./.github/scripts/get-latest-tag.sh
env:
REPO: frappe/erpnext
VERSION: ${{ matrix.version }}
- name: Build ERPNext images
uses: docker/bake-action@v1.6.0
with:
files: docker-bake.hcl
targets: erpnext-stable
push: true
- name: Test
if: ${{ matrix.version != 12 }}
run: ./.github/scripts/install-deps-and-test.sh
- name: Setup Helm deploy key
if: github.repository == 'frappe/frappe_docker'
uses: webfactory/ssh-agent@v0.5.3
with:
ssh-private-key: ${{ secrets.HELM_DEPLOY_KEY }}
- name: Release Helm Chart
if: github.repository == 'frappe/frappe_docker'
run: |
pip install --upgrade pip
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