2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-09-20 02:59:02 +00:00
frappe_docker/.github/workflows/build_stable.yml

137 lines
3.3 KiB
YAML
Raw Normal View History

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:
2021-11-04 12:31:49 +00:00
build_frappe:
name: Frappe
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
if: github.repository == 'frappe/frappe_docker'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
2021-11-04 12:31:49 +00:00
- name: Get latest versions
run: |
./.github/scripts/get-latest-tags.sh
echo "VERSION=$VERSION" >>$GITHUB_ENV
echo "GIT_TAG=$FRAPPE_VERSION" >>$GITHUB_ENV
echo "GIT_BRANCH=version-$VERSION" >>$GITHUB_ENV
env:
VERSION: ${{ matrix.version }}
2021-11-04 12:31:49 +00:00
- name: Build
uses: docker/bake-action@v1.6.0
with:
files: docker-bake.hcl
2021-11-04 12:31:49 +00:00
targets: frappe-stable-test
load: true
2021-11-04 12:31:49 +00:00
- name: Test
run: ./tests/test-frappe.sh
2021-11-04 12:31:49 +00:00
- name: Push
if: github.repository == 'frappe/frappe_docker'
uses: docker/bake-action@v1.6.0
with:
files: docker-bake.hcl
2021-11-04 12:31:49 +00:00
targets: frappe-stable
push: true
2021-11-04 12:31:49 +00:00
build_erpnext:
name: ERPNext
runs-on: ubuntu-latest
needs: build_frappe
2021-11-04 12:31:49 +00:00
strategy:
matrix:
version: [12, 13]
steps:
- name: Checkout
uses: actions/checkout@v2
2021-11-04 12:31:49 +00:00
- name: Setup Buildx
uses: docker/setup-buildx-action@v1
- name: Login
uses: docker/login-action@v1
if: github.repository == 'frappe/frappe_docker'
2021-11-04 12:31:49 +00:00
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Get latest versions
run: |
./.github/scripts/get-latest-tags.sh
echo "VERSION=$VERSION" >>$GITHUB_ENV
echo "GIT_TAG=$ERPNEXT" >>$GITHUB_ENV
echo "GIT_BRANCH=version-$VERSION" >>$GITHUB_ENV
env:
VERSION: ${{ matrix.version }}
2021-11-04 12:31:49 +00:00
- name: Build
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-11-04 12:31:49 +00:00
- name: Test
run: ./tests/test-erpnext.sh
2021-11-04 12:31:49 +00:00
- 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
2021-11-04 12:31:49 +00:00
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 }}
2021-11-04 12:31:49 +00:00
- 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