mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-27 09:15:10 +00:00
ci: Build and test stable images on PR
This commit is contained in:
parent
854c8f25c4
commit
6e2d08726b
1 changed files with 20 additions and 5 deletions
25
.github/workflows/build_stable.yml
vendored
25
.github/workflows/build_stable.yml
vendored
|
|
@ -1,6 +1,18 @@
|
||||||
name: Build Stable
|
name: Build Stable
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- .github/**
|
||||||
|
- build/**
|
||||||
|
- installation/**
|
||||||
|
- tests/**
|
||||||
|
- .dockerignore
|
||||||
|
- docker-bake.hcl
|
||||||
|
- docker-compose.yml
|
||||||
|
- env*
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
@ -19,6 +31,9 @@ on:
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
IS_AUTHORIZED_RUN: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_frappe:
|
build_frappe:
|
||||||
name: Frappe
|
name: Frappe
|
||||||
|
|
@ -36,7 +51,7 @@ jobs:
|
||||||
|
|
||||||
- name: Login
|
- name: Login
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
if: github.repository == 'frappe/frappe_docker'
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
@ -57,7 +72,7 @@ jobs:
|
||||||
run: ./tests/test-frappe.sh
|
run: ./tests/test-frappe.sh
|
||||||
|
|
||||||
- name: Push
|
- name: Push
|
||||||
if: github.repository == 'frappe/frappe_docker'
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
||||||
uses: docker/bake-action@v1.6.0
|
uses: docker/bake-action@v1.6.0
|
||||||
with:
|
with:
|
||||||
files: docker-bake.hcl
|
files: docker-bake.hcl
|
||||||
|
|
@ -83,7 +98,7 @@ jobs:
|
||||||
|
|
||||||
- name: Login
|
- name: Login
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
if: github.repository == 'frappe/frappe_docker'
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
@ -104,7 +119,7 @@ jobs:
|
||||||
run: ./tests/test-erpnext.sh
|
run: ./tests/test-erpnext.sh
|
||||||
|
|
||||||
- name: Push
|
- name: Push
|
||||||
if: github.repository == 'frappe/frappe_docker'
|
if: env.IS_AUTHORIZED_RUN == 'true'
|
||||||
uses: docker/bake-action@v1.6.0
|
uses: docker/bake-action@v1.6.0
|
||||||
with:
|
with:
|
||||||
files: docker-bake.hcl
|
files: docker-bake.hcl
|
||||||
|
|
@ -116,7 +131,7 @@ jobs:
|
||||||
release_helm:
|
release_helm:
|
||||||
name: Release Helm
|
name: Release Helm
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.repository == 'frappe/frappe_docker'
|
if: github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request'
|
||||||
needs: [build_frappe, build_erpnext]
|
needs: [build_frappe, build_erpnext]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue