Skip to content

Commit

Permalink
Container: Try using arm64 hosted runner
Browse files Browse the repository at this point in the history
  • Loading branch information
badlop committed Jan 17, 2025
1 parent 17f1f8d commit 351a00f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ RUN wget -O - https://github.com/elixir-lang/elixir/archive/v$ELIXIR_VSN.tar.gz
WORKDIR elixir-$ELIXIR_VSN

Check warning on line 44 in .github/container/Dockerfile

View workflow job for this annotation

GitHub Actions / Container (amd64)

Relative workdir without an absolute workdir declared within the build can have unexpected results if the base image changes

WorkdirRelativePath: Relative workdir "elixir-1.18.1" can have unexpected results if the base image changes More info: https://docs.docker.com/go/dockerfile/rule/workdir-relative-path/

Check warning on line 44 in .github/container/Dockerfile

View workflow job for this annotation

GitHub Actions / Container (arm64)

Relative workdir without an absolute workdir declared within the build can have unexpected results if the base image changes

WorkdirRelativePath: Relative workdir "elixir-1.18.1" can have unexpected results if the base image changes More info: https://docs.docker.com/go/dockerfile/rule/workdir-relative-path/
ENV ERL_FLAGS="+JPperf true"
RUN make install clean
RUN pwd

RUN mix local.hex --force \
&& mix local.rebar --force
Expand All @@ -62,6 +63,9 @@ RUN mv .github/container/ejabberdctl.template . \
WORKDIR /rootfs
ARG VERSION
ARG HOME
RUN echo "build_dir: $BUILD_DIR"
RUN echo "home: $HOME"
RUN echo "home: $HOME"
RUN mkdir -p $HOME $HOME-$VERSION \
&& cp -r $BUILD_DIR/_build/prod/rel/ejabberd/* $HOME-$VERSION \
&& mv $HOME-$VERSION/conf $HOME/conf
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ env:
jobs:
container:
name: Container
runs-on: ubuntu-22.04
runs-on: ${{ matrix.platform == 'arm64' && 'ubuntu-22.04-arm' || 'ubuntu-22.04' }}
strategy:
matrix:
platform: [amd64, arm64]
permissions:
packages: write
steps:
Expand Down Expand Up @@ -53,9 +56,6 @@ jobs:
org.opencontainers.image.licenses=GPL-2.0
org.opencontainers.image.vendor=ProcessOne
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

Expand All @@ -69,6 +69,6 @@ jobs:
context: .
file: .github/container/Dockerfile
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
platforms: linux/${{ matrix.platform }}
push: true
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit 351a00f

Please sign in to comment.