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 repo: erpnext
version: develop version: develop
push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }} push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
env: multiarch: ${{ github.event_name != 'pull_request' }}
MULTI_ARCH_BUILD: ${{ github.event_name != 'pull_request' }}
secrets: secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

View file

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

View file

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