-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
156 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# build diy image based on debian bullseye and bookworm | ||
# test install.sh script as-it | ||
name: Test DIY install.sh | ||
|
||
# only trigger when last commit or PR modify install/** | ||
on: | ||
# only trigger CI when pull request on following branches | ||
pull_request: | ||
branches: | ||
- 'alpha' | ||
paths: | ||
- install/** | ||
push: | ||
# only trigger CI when push on following branches | ||
branches: | ||
- 'feat/diy_test_install' | ||
paths: | ||
- install/** | ||
# this is to manually trigger the worklow | ||
workflow_dispatch: | ||
inputs: | ||
logLevel: | ||
description: 'Reason' | ||
default: 'Manual launch' | ||
|
||
env: | ||
GITHUB_REPOSITORY: jeedom/core | ||
|
||
jobs: | ||
InstallationDIY: | ||
# This step build the same image on different runners / platforms | ||
strategy: | ||
# continue all jobs even if some fail | ||
fail-fast: false | ||
matrix: | ||
debian: [ bullseye] # [bullseye, bookworm ] | ||
targetRunner: [ ubuntu-latest] # [ ubuntu-latest, ARM, ARM64] | ||
database: [ 1] # [1, 0] | ||
|
||
runs-on: ${{ matrix.targetRunner }} | ||
steps: | ||
|
||
- name: Check Out Repo | ||
# Check out the repo, using current branch | ||
# https://github.com/marketplace/actions/checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: install jeedom:${{ matrix.debian }} | ||
# run current installation | ||
run: | | ||
echo "Running DIY install of ${GITHUB_REPOSITORY} / ${GITHUB_REF_NAME}" >> ${GITHUB_STEP_SUMMARY} | ||
grep -E '^(VERSION|PRETTY_NAME)=' /etc/os-release >> ${GITHUB_STEP_SUMMARY} | ||
chmod +x install/install.sh | ||
sudo install/install.sh -v alpha -d ${{ matrix.database }} | ||
composer --version >> ${GITHUB_STEP_SUMMARY} | ||
node --version >> ${GITHUB_STEP_SUMMARY} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
ARG DEBIAN=bookworm-slim | ||
|
||
FROM debian:${DEBIAN} | ||
|
||
ARG WEBSERVER_HOME=/var/www/html | ||
ENV WEBSERVER_HOME=${WEBSERVER_HOME} | ||
ARG VERSION=alpha | ||
ENV VERSION=${VERSION} | ||
ARG DATABASE=1 | ||
WORKDIR ${WEBSERVER_HOME} | ||
|
||
COPY --chown=root:root --chmod=550 install.sh /install.sh | ||
RUN /install.sh -v ${VERSION} -w ${WEBSERVER_HOME} -d ${DATABASE} | ||
|
||
# créer le script d'init avec la syntaxe EOF | ||
COPY --chown=root:root --chmod=550 <<EOF /root/init.sh | ||
#!/bin/bash | ||
# démarrer mariadb | ||
service mariadb start | ||
# démarrer atd | ||
service atd start | ||
# démarrer apache2 | ||
service apache2 start | ||
# démarrer cron | ||
service cron start | ||
# attendre à l'infini | ||
while :; do echo "$((COUNT++)) DAYS"; sleep 86400; done | ||
EOF | ||
|
||
COPY <<EOF /var/www/html/info.php | ||
<?php phpinfo(); | ||
EOF | ||
|
||
# définir le script d'init comme commande par défaut | ||
CMD ["/root/init.sh"] |