Skip to content

Commit

Permalink
Add ARM64 images for 7.1 and 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
brantburnett committed Nov 19, 2023
1 parent cfd18cd commit 350c236
Showing 1 changed file with 21 additions and 52 deletions.
73 changes: 21 additions & 52 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,9 @@ on:
# Run tests for any PRs.
pull_request:

env:
IMAGE_NAME: btburnett3/couchbasefakeit

jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
test:
runs-on: ubuntu-latest

strategy:
matrix:
couchbase-version:
- enterprise-6.6.0
- enterprise-6.6.6
- community-7.0.2
- enterprise-7.0.5
- community-7.1.1
- enterprise-7.1.5
- community-7.2.2
- enterprise-7.2.2

steps:
- uses: actions/checkout@v3

- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
docker build . --file Dockerfile --build-arg COUCHBASE_TAG=${{ matrix.couchbase-version }}
fi
# See also https://docs.docker.com/docker-hub/builds/
push:
# Ensure test job passes before pushing image.
needs: test

build:
runs-on: ubuntu-latest
if: github.event_name == 'push'

strategy:
matrix:
Expand All @@ -62,17 +25,23 @@ jobs:
- enterprise-7.2.2

steps:
- uses: actions/checkout@v3

- name: Build image
run: docker build . --file Dockerfile --build-arg COUCHBASE_TAG=${{ matrix.couchbase-version }} --tag $IMAGE_NAME

- name: Log into registry
run: echo "${{ secrets.DOCKER_TOKEN }}" | docker login -u btburnett3 --password-stdin

- name: Push image
run: |
echo Version: ${{ matrix.couchbase-version }}
docker tag $IMAGE_NAME $IMAGE_NAME:${{ matrix.couchbase-version }}
docker push $IMAGE_NAME:${{ matrix.couchbase-version }}
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: btburnett3
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
build-args: "COUCHBASE_TAG=${{ matrix.couchbase-version }}"
platforms: ${{ (contains(matrix.couchbase-version, '-7.1') || contains(matrix.couchbase-version, '-7.2')) && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
push: ${{ github.event_name == 'push' }}
tags: "btburnett3/couchbasefakeit:${{ matrix.couchbase-version }}"

0 comments on commit 350c236

Please sign in to comment.