switch from env var to input for action

This commit is contained in:
Al Majumdar 2022-04-02 11:30:51 +05:30
parent 9c3cea17b9
commit d8657d5d82
3 changed files with 7 additions and 9 deletions

View file

@ -28,8 +28,7 @@ jobs:
repo: erpnext
version: develop
push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
env:
MULTI_ARCH_BUILD: ${{ github.event_name != 'pull_request' }}
multiarch: ${{ github.event_name != 'pull_request' }}
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

View file

@ -40,8 +40,7 @@ jobs:
repo: erpnext
version: "13"
push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
env:
MULTI_ARCH_BUILD: ${{ github.event_name != 'pull_request' }}
multiarch: ${{ github.event_name != 'pull_request' }}
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
@ -52,8 +51,7 @@ jobs:
repo: erpnext
version: "13"
push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
env:
MULTI_ARCH_BUILD: ${{ github.event_name != 'pull_request' }}
multiarch: ${{ github.event_name != 'pull_request' }}
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

View file

@ -14,9 +14,10 @@ on:
push:
required: true
type: boolean
env:
MULTI_ARCH_BUILD:
multiarch:
required: true
type: boolean
description: "toggle for multi arch build"
secrets:
DOCKERHUB_USERNAME:
required: true
@ -57,7 +58,7 @@ jobs:
push: true
env:
REGISTRY_USER: localhost:5000/frappe
MULTI_ARCH_BUILD: ${{ env.MULTI_ARCH_BUILD }}
MULTI_ARCH_BUILD: ${{ input.multiarch }}
- name: Setup Python
uses: actions/setup-python@v3