Skip to content

Commit

Permalink
Add config for building Ubuntu 24.04
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-klein committed Jun 21, 2024
1 parent 355e027 commit 155c737
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,23 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

build-ubuntu2404-image:
name: Build Docker Image for building Ezra Bible App on Ubuntu 24.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
name: Check out

- uses: mr-smithers-excellent/docker-build-push@v3
name: Build & push Docker image
with:
dockerfile: docker/Ubuntu2404_Dockerfile
image: toklein/ezra-ubuntu-2404
tag: latest
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

build-mint21-image:
name: Build Docker Image for building Ezra Bible App on Mint 21
runs-on: ubuntu-latest
Expand Down
33 changes: 33 additions & 0 deletions docker/Ubuntu2404_Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Dockerfile for Ubuntu 22.04 Build Enviroment for Ezra Bible App

FROM ubuntu:24.04

ARG HOST_USER

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get -y update
RUN apt-get -y dist-upgrade
RUN apt-get -y install apt-utils
RUN apt-get -y update

RUN apt-get install -y dialog build-essential libsword-dev libsqlite3-0 libcurl4-gnutls-dev libicu-dev zlib1g-dev \
pkg-config icu-devtools subversion git vim sudo curl python3-software-properties cmake

# AppImage dependencies
RUN apt-get install -y libfuse2 wget

RUN apt-get install -y curl python3-software-properties
RUN curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
# Install node 14.17.5
RUN export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && nvm install 14.17.5 && \
npm install -g electron-packager electron-installer-debian

RUN apt-get install -y unzip
RUN apt-get install -y xvfb

RUN ln -s /usr/bin/python3 /usr/bin/python

COPY docker/build_ubuntu_2404.sh /build.sh

ENTRYPOINT ["/build.sh"]
17 changes: 17 additions & 0 deletions docker/build_ubuntu_2404.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
# This script triggers all the steps necessary for building and packaging Ezra Bible App on Linux.

export NVM_DIR="/root/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

git config --global --add safe.directory /github/workspace

npm run build-linux
npm run deb_2404
cp release/packages/*.deb $GITHUB_WORKSPACE/ezra-bible-app_latest.deb

if [ "$GITHUB_EVENT_NAME" = "release" ]; then
node_modules/.bin/sentry-cli --auth-token $SENTRY_TOKEN \
upload-dif -o tobias-klein -p ezra-bible-app \
node_modules/node-sword-interface/build/Release/node_sword_interface.node
fi

0 comments on commit 155c737

Please sign in to comment.