Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arm #41

Merged
merged 3 commits into from
Jan 31, 2025
Merged

Arm #41

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 26 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ env:
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

permissions:
contents: read
packages: write
Expand All @@ -29,21 +28,29 @@ jobs:
matrix:
platform:
- linux/amd64
# - linux/arm64
- linux/arm64
- linux/arm/v7
image:
- eveseat/seat
- ghcr.io/eveseat/seat

include:
- os: ubuntu-latest
- os: ubuntu-24.04-arm
platform: linux/arm64
- os: ubuntu-24.04-arm
platform: linux/arm/v7
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Clone repository
uses: actions/checkout@v4

- name: Get artifact name
id: getartifactname
run: echo "artifact=$(printf '%s-digests' ${{ matrix.image }} | sed 's/\//-/g;s/\./-/g')" >> "$GITHUB_OUTPUT"
- name: Prepare
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV

# Define tagging policy
# - everything coming in another branch than default one is considered edge (unstable)
Expand Down Expand Up @@ -85,11 +92,11 @@ jobs:

- name: Update embedded manifest
run: |
echo ${{ steps.meta.outputs.version }} > version
echo ${{ steps.meta.outputs.version }} > image_version

- name: Build and push by digest
id: build
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
platforms: ${{ matrix.platform }}
Expand All @@ -100,15 +107,15 @@ jobs:

- name: Export digest
run: |
mkdir -p /tmp/digests
mkdir -p ${{ runner.temp }}/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
touch "${{ runner.temp }}/digests/${digest#sha256:}"

- name: Upload digest
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ steps.getartifactname.outputs.artifact }}
path: /tmp/digests/*
name: digests-${{ env.PLATFORM_PAIR }}
path: ${{ runner.temp }}/digests/*
if-no-files-found: error
retention-days: 1

Expand All @@ -123,15 +130,13 @@ jobs:
- eveseat/seat
- ghcr.io/eveseat/seat
steps:
- name: Get artifact name
id: getartifactname
run: echo "artifact=$(printf '%s-digests' ${{ matrix.image }} | sed 's/\//-/g;s/\./-/g')" >> "$GITHUB_OUTPUT"

- name: Download digests
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ steps.getartifactname.outputs.artifact }}
path: /tmp/digests
path: ${{ runner.temp }}/digests
pattern: digests-*
merge-multiple: true

- name: Set up Docker Build-X
uses: docker/setup-buildx-action@v3
Expand Down Expand Up @@ -163,7 +168,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Create manifest list and push
working-directory: /tmp/digests
working-directory: ${{ runner.temp }}/digests
run: |
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ matrix.image }}@sha256:%s ' *)
Expand Down
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ FROM --platform=$TARGETPLATFORM php:8.2-apache-bookworm AS seat

# OS Packages
# - networking diagnose tools
# - build tools
# - compression libraries and tools
# - databases libraries
# - picture and drawing libraries
Expand All @@ -25,19 +26,22 @@ RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
iputils-ping dnsutils \
pkg-config build-essential \
zip unzip libzip-dev libbz2-dev \
mariadb-client libpq-dev redis-tools \
libpng-dev libjpeg-dev libfreetype6-dev \
jq libgmp-dev libicu-dev \
mariadb-client libpq-dev redis-tools libpq5 postgresql-client \
libpng-dev libjpeg62-turbo-dev libfreetype6-dev libwebp-dev \
jq libgmp-dev libicu-dev nano \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# PHP Extentions
RUN pecl install redis && \
docker-php-ext-configure gd \
--with-freetype \
--with-webp \
--with-jpeg && \
docker-php-ext-install zip pdo pdo_mysql pdo_pgsql gd bz2 gmp intl pcntl opcache && \
docker-php-ext-configure pgsql && \
docker-php-ext-install -j$(nproc) zip pdo pdo_mysql pdo_pgsql gd bz2 gmp intl pcntl opcache && \
docker-php-ext-enable redis && \
apt-get autoremove

Expand Down
Loading