Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
ysdragon committed Nov 5, 2024
1 parent 1649117 commit 9769b8e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 8 deletions.
30 changes: 29 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,50 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install cosign
if: github.event_name != 'pull_request'
uses: sigstore/[email protected]
with:
cosign-release: 'v2.4.1'

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/[email protected]

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

- name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}

- name: Extract Docker metadata
id: meta
uses: docker/[email protected]
with:
images: quay.io/ydrag0n/ring

- name: Build and push
id: build-and-push
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: quay.io/ydrag0n/ring:latest,quay.io/ydrag0n/ring:${{ github.ref_name }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=target
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Sign the published Docker image
if: ${{ github.event_name != 'pull_request' }}
env:
TAGS: ${{ steps.meta.outputs.tags }}
DIGEST: ${{ steps.build-and-push.outputs.digest }}
run: echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}

16 changes: 9 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ RUN apt-get update && apt-get install -y -qq --no-install-recommends \
libsdl2-mixer-dev \
libsdl2-image-dev \
libsdl2-ttf-dev \
libglew-dev \
libgl-dev \
apache2 \
libuv1-dev \
&& apt-get clean \
Expand All @@ -68,8 +70,8 @@ RUN mkdir -p /opt/raylib

# Clone and build raylib
WORKDIR /opt/raylib
RUN wget https://github.com/raysan5/raylib/archive/refs/tags/5.0.zip \
&& unzip 5.0.zip \
RUN wget -q https://github.com/raysan5/raylib/archive/refs/tags/5.0.zip \
&& unzip -q 5.0.zip \
&& cd raylib-5.0 \
&& cmake -B build -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -GNinja \
&& cmake --build build \
Expand All @@ -80,7 +82,7 @@ RUN mkdir -p /opt/tilengine

# Clone and build tilengine
WORKDIR /opt/tilengine
RUN git clone --depth 1 https://github.com/megamarc/Tilengine . \
RUN git clone --depth 1 -q https://github.com/megamarc/Tilengine . \
&& cd src \
&& make -j$(nproc) \
&& cd ../ \
Expand All @@ -93,7 +95,7 @@ RUN mkdir -p /opt/libui-ng

# Clone and build libui-ng
WORKDIR /opt/libui-ng
RUN git clone --depth 1 https://github.com/libui-ng/libui-ng . \
RUN git clone --depth 1 -q https://github.com/libui-ng/libui-ng . \
&& meson setup build \
&& ninja -C build \
&& ninja -C build install
Expand All @@ -106,7 +108,7 @@ RUN mkdir -p /opt/ring

# Clone and build Ring
WORKDIR /opt/ring
RUN git clone --depth 1 --branch v1.21.2 https://github.com/ring-lang/ring .
RUN git clone --depth 1 --branch v1.21.2 -q https://github.com/ring-lang/ring .

COPY patches/ringpdfgen.patch .
RUN git apply ringpdfgen.patch
Expand All @@ -128,8 +130,8 @@ RUN find . -type f -name "*.sh" -exec sed -i 's/\bsudo\b//g' {} + \
&& sed -i '/extensions\/ringlibui\/linux/d' bin/install.sh \
&& sed -i 's/-L \/usr\/local\/pgsql\/lib//g' extensions/ringpostgresql/buildgcc.sh \
&& cd build \
&& bash buildgcc.sh

&& bash buildgcc.sh -ring -ringallegro -ringfreeglut -ringmurmurhash -ringqt-core -ringqt-light -ringqt -ringstbimage -ringzip -ringhttplib -ringmysql -ringraylib -ringtilengine -ringthreads -ringcjson -ringinternet -ringodbc -ringrogueutil -ringpdfgen -ringconsolecolors -ringlibui -ringopengl -ringsdl -ringcurl -ringlibuv -ringopenssl -ringsockets -ringfastpro -ringpostgresql -ringsqlite -ring2exe -ringpm
# Copy the entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
Expand Down

0 comments on commit 9769b8e

Please sign in to comment.