2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-12-23 10:38:58 +00:00

Add platforms to bake file to include m1 (arm64) (#733)

* add platforms to bake file to include m1 (arm64)

* add platforms to bake file to include m1 (arm64)

* rebased to latest main

* update docker/bake-action to latest version

* test action fix

* add qemu step

* revert to older version of bake

* remove arm64 from breaking build

* test with vanilla buildx

* cleanup

* added platforms directive to default args

* use build_push from current branch

* explicit build_push dependency

* use build push from current branch

* specify branch name

* experiment with syntax

* use commit id for tag

* experiment to extract branch from context

* ditto

* one more variation

* revert

* revert build push to version in current main

* added comment to force build

* force another build

* comment out build on PR

* test if event is pull request

* first test, event is "none"

* fix typo

* correct syntax

* set event name correctly

* explicit variable for multi arch build

* test multi arch build

* test negated conditional

* enable PR build

* use env variable to control multi arch

* test with env var

* revert

* revert

* try syntax variation

* check val

* try variation

* add platforms

* re-enable PR builds

* revert file

* untested but should work

* switch from env var to input for action

* test against restlessronin branch

* fix typo

* cleanups

* revert action link

* refactor to explicit platform list

* try variation

* remove env toggle

* retry

* try multi build

* ternary workaround

* cleanup

* revert action branch

* fix typo

* yat

* revert to origin CI action

* post review changes (untested)

* no arm for v12
This commit is contained in:
Al Majumdar 2022-04-03 18:48:36 +05:30 committed by GitHub
parent 832c44c8ea
commit 1fba893504
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 0 deletions

View File

@ -22,6 +22,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Setup QEMU
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: all
- name: Setup Buildx
uses: docker/setup-buildx-action@v1
@ -43,3 +49,4 @@ jobs:
with:
targets: bench
push: true
set: "*.platform=linux/amd64,linux/arm64"

View File

@ -28,6 +28,7 @@ jobs:
repo: erpnext
version: develop
push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

View File

@ -40,6 +40,7 @@ jobs:
repo: erpnext
version: "12"
push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
platforms: linux/amd64
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
@ -50,6 +51,7 @@ jobs:
repo: erpnext
version: "13"
push: ${{ github.repository == 'frappe/frappe_docker' && github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

View File

@ -14,6 +14,10 @@ on:
push:
required: true
type: boolean
platforms:
required: true
type: string
description: "list of target platforms"
secrets:
DOCKERHUB_USERNAME:
required: true
@ -83,3 +87,4 @@ jobs:
uses: docker/bake-action@v1.7.0
with:
push: true
set: "*.platform=${{ inputs.platforms }}"