Skip to content

Commit

Permalink
Add support linux/arm64
Browse files Browse the repository at this point in the history
Signed-off-by: Aisuko <[email protected]>
  • Loading branch information
Aisuko committed Jul 1, 2024
1 parent 5641645 commit 9b3039e
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 6 deletions.
48 changes: 43 additions & 5 deletions .github/workflows/build_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,51 @@ jobs:
name: 'Check building🐳'
strategy:
matrix:
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
config:
- { dockerfile: "Dockerfile", platforms: "linux/amd64,linux/arm64" }
runs-on: ubuntu-latest
steps:
- name: Check repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

# https://github.com/jlumbroso/free-disk-space/tree/54081f138730dfa15788a46383842cd2f914a1be#example
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false

# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true

- name: Get tag name
id: tag
shell: bash
run: |
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
echo "Tag=${SHORT_HASH}"
- name: Build Docker image
if: startsWith(github.ref, 'refs/tags/') != true && success()
run: |
docker build -t ${{ secrets.DOCKER_REGISTRY }}/${{ secrets.IMAGE_NAME }}:${GITHUB_SHA::7} .
uses: docker/build-push-action@v4
with:
context: .
push: false
platforms: ${{ matrix.config.platforms }}
tags: "${{ secrets.DOCKER_REGISTRY }}/${{ secrets.IMAGE_NAME }}:${{ SHORT_HASH }}"
file: ${{ matrix.config.dockerfile }}
# run: |
# docker build -t ${{ secrets.DOCKER_REGISTRY }}/${{ secrets.IMAGE_NAME }}:${GITHUB_SHA::7} .
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
with:
config-name: release-drafter.yml
Expand Down
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,49 @@ This repo is incubator for containers.
[![Backend CI/CD 🚀](https://github.com/SkywardAI/containers/actions/workflows/release_image.yml/badge.svg)](https://github.com/SkywardAI/containers/actions/workflows/ci.yml)


# Requirements

Docker and docker-compose version see below:

```bash
ubuntu:~$ docker version
Client:
Version: 24.0.7
API version: 1.43
Go version: go1.21.1
Git commit: 24.0.7-0ubuntu2~22.04.1
Built: Wed Mar 13 20:23:54 2024
OS/Arch: linux/amd64
Context: default

Server:
Engine:
Version: 24.0.7
API version: 1.43 (minimum version 1.12)
Go version: go1.21.1
Git commit: 24.0.7-0ubuntu2~22.04.1
Built: Wed Mar 13 20:23:54 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.7.12
GitCommit:
runc:
Version: 1.1.12-0ubuntu2~22.04.1
GitCommit:
docker-init:
Version: 0.19.0
GitCommit:


ubuntu:~$ docker-compose version
docker-compose version 1.29.2, build unknown
docker-py version: 5.0.3
CPython version: 3.10.12
OpenSSL version: OpenSSL 3.0.2 15 Mar 2022

```

# Building image

The project should be developed in a containerized environment which means it should be opened in the container of [Dockerfile](./Dockerfile).
Expand Down

0 comments on commit 9b3039e

Please sign in to comment.