Skip to content

Commit

Permalink
build images for both linux/amd64 & linux/arm64 archs
Browse files Browse the repository at this point in the history
  • Loading branch information
WengerK committed Feb 20, 2024
1 parent 9282110 commit 0ca1633
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/container-structure-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
', github.ref)
strategy:
matrix:
platforms: 'linux/amd64,linux/arm64'
drupal_version: ['8.9', '9.0', '9.1', '9.2', '9.3', '9.4', '9.5', '10.0', '10.1']
include:
- drupal_version: '8.9'
Expand All @@ -74,7 +75,7 @@ jobs:
- name: checkout source
uses: actions/checkout@master
- name: Build docker images
run: make
run: ARCH_TO_BUILD=${{ matrix.platforms }} make
working-directory: ${{ matrix.drupal_major }}/${{ matrix.drupal_version }}
-
name: Login to DockerHub
Expand Down
7 changes: 5 additions & 2 deletions 10/10.0/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ DRUPAL_VER ?= 10.0
DRUPAL_VER_MAJOR ?= $(shell echo "${DRUPAL_VER}" | grep -oE '^[0-9]+\.[0-9]+')

BASE_IMAGE_TAG = 10.0
ARCH_TO_BUILD ?= "linux/amd64"

REPO = wengerk/drupal-for-contrib
NAME = drupal-$(DRUPAL_VER_MAJOR)
Expand All @@ -23,13 +24,15 @@ endif
default: build

build:
docker build -t $(REPO):$(TAG) \
docker buildx build -t $(REPO):$(TAG) \
--platform=${ARCH_TO_BUILD} \
--build-arg BASE_IMAGE_TAG=$(BASE_IMAGE_TAG) \
--build-arg DRUPAL_VER=$(DRUPAL_VER) \
./

build-nc:
docker build -t $(REPO):$(TAG) \
docker buildx build -t $(REPO):$(TAG) \
--platform=${ARCH_TO_BUILD} \
--build-arg BASE_IMAGE_TAG=$(BASE_IMAGE_TAG) \
--build-arg DRUPAL_VER=$(DRUPAL_VER) \
--no-cache --pull \
Expand Down
7 changes: 5 additions & 2 deletions 10/10.1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ DRUPAL_VER ?= 10.1
DRUPAL_VER_MAJOR ?= $(shell echo "${DRUPAL_VER}" | grep -oE '^[0-9]+\.[0-9]+')

BASE_IMAGE_TAG = 10.0
ARCH_TO_BUILD ?= "linux/amd64"

REPO = wengerk/drupal-for-contrib
NAME = drupal-$(DRUPAL_VER_MAJOR)
Expand All @@ -23,13 +24,15 @@ endif
default: build

build:
docker build -t $(REPO):$(TAG) \
docker buildx build -t $(REPO):$(TAG) \
--platform=${ARCH_TO_BUILD} \
--build-arg BASE_IMAGE_TAG=$(BASE_IMAGE_TAG) \
--build-arg DRUPAL_VER=$(DRUPAL_VER) \
./

build-nc:
docker build -t $(REPO):$(TAG) \
docker buildx build -t $(REPO):$(TAG) \
--platform=${ARCH_TO_BUILD} \
--build-arg BASE_IMAGE_TAG=$(BASE_IMAGE_TAG) \
--build-arg DRUPAL_VER=$(DRUPAL_VER) \
--no-cache --pull \
Expand Down

0 comments on commit 0ca1633

Please sign in to comment.