Skip to content

Commit

Permalink
Build aarch64 variant of discourse/discourse_test image
Browse files Browse the repository at this point in the history
  • Loading branch information
tgxworld committed Oct 11, 2023
1 parent 246f03b commit 0d05d17
Showing 1 changed file with 41 additions and 4 deletions.
45 changes: 41 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
docker tag discourse/discourse_dev:build discourse/discourse_dev:release
docker login --username discoursebuild --password $DOCKERHUB_PASSWORD
docker push discourse/discourse_dev:release
aarch64:
base_aarch64:
runs-on: ubuntu-latest
needs: base
services:
Expand All @@ -150,10 +150,14 @@ jobs:
--tag discourse/base:aarch64-slim
docker tag discourse/base:aarch64-slim localhost:5000/discourse/base:aarch64-slim
docker push localhost:5000/discourse/base:aarch64-slim
- name: tag slim image as release
- name: build release image
working-directory: image/base
run: |
docker tag discourse/base:aarch64-slim discourse/base:aarch64
docker buildx build . --load \
-f release.Dockerfile \
--platform linux/arm64 \
--build-arg tag=aarch64-slim from=localhost:5000/discourse/base \
--tag discourse/base:aarch64-release
- name: Print summary
run: docker images discourse/base
- name: push to dockerhub
Expand All @@ -162,4 +166,37 @@ jobs:
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
run: |
docker login --username discoursebuild --password $DOCKERHUB_PASSWORD
docker push discourse/base:aarch64
docker push discourse/base:aarch64-slim
docker push discourse/base:aarch64-release
test_aarch64:
runs-on: ubuntu-latest
needs: base_aarch64
defaults:
run:
working-directory: image/discourse_test
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: build discourse_test:release
run: |
docker buildx build . --load \
--platform linux/arm64 \
--build-arg from_tag=aarch64 \
--target release \
--tag discourse/discourse_test:aarch64-release
- name: Print summary
run: |
docker images discourse/discourse_test
- name: push to dockerhub
if: success() && (github.ref == 'refs/heads/main')
env:
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
run: |
docker login --username discoursebuild --password $DOCKERHUB_PASSWORD
docker push discourse/discourse_test:aarch64-release

0 comments on commit 0d05d17

Please sign in to comment.