mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-11-14 00:54:07 +00:00
133 lines
3.1 KiB
YAML
133 lines
3.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_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: github.repository == 'frappe/frappe_docker'
|
|
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: github.repository == 'frappe/frappe_docker'
|
|
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: github.repository == 'frappe/frappe_docker'
|
|
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: github.repository == 'frappe/frappe_docker'
|
|
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'
|
|
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
|