enable PR build

This commit is contained in:
Al Majumdar 2022-04-01 15:05:35 +05:30
parent 56081eb02e
commit 968e152f9e
2 changed files with 19 additions and 14 deletions

View file

@ -1,20 +1,19 @@
name: Develop build name: Develop build
on: on:
# toggle commenting to run on PR pull_request:
# pull_request: branches:
# branches: - main
# - main paths:
# paths: - images/nginx/**
# - images/nginx/** - images/socketio/**
# - images/socketio/** - images/worker/**
# - images/worker/** - overrides/**
# - overrides/** - tests/**
# - tests/** - compose.yaml
# - compose.yaml - docker-bake.hcl
# - docker-bake.hcl - example.env
# - example.env - .github/workflows/build_develop.yml
# - .github/workflows/build_develop.yml
schedule: schedule:
# Every day at 12:00 pm # Every day at 12:00 pm
@ -28,6 +27,7 @@ jobs:
with: with:
repo: erpnext repo: erpnext
version: develop version: develop
platform: linux/amd64
push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }} push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
secrets: secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}

View file

@ -14,6 +14,9 @@ on:
push: push:
required: true required: true
type: boolean type: boolean
platform:
required: true
type: string
secrets: secrets:
DOCKERHUB_USERNAME: DOCKERHUB_USERNAME:
required: true required: true
@ -51,7 +54,9 @@ jobs:
- name: Build - name: Build
uses: docker/bake-action@v1.7.0 uses: docker/bake-action@v1.7.0
with: with:
set: "*.platform=${{ inputs.platform }}"
push: true push: true
env: env:
REGISTRY_USER: localhost:5000/frappe REGISTRY_USER: localhost:5000/frappe