Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

LAMP Stack

LAMP Stack #123

name: LAMP Stack
on:
schedule:
- cron: '00 19 * * *'
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
LAMP-AMD64:
strategy:
matrix:
pv: ["8.2", "8.1", "8.0", "7.4", "7.3", "7.2"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image Apache php ${{ matrix.pv }}
run: docker-compose -f "docker-compose.yml" up -d --build
env:
PHP_VERSION: "${{ matrix.pv }}"
XDEBUG: true
DISPLAY_PHPERROR: true
SERVER_ROOT: /var/www/
APP_CODE_PATH_HOST: /tmp/app
DB_NAME: test
DB_USER: admin
DB_PASSWORD: password
DB_ROOT_PASSWORD: password
DATA_PATH_HOST: /tmp/lamp
MARIADB_VERSION: 10.7
- name: PHP version check
run : docker exec lamp-stack_apache_1 php -v
- name: Mongodb driver check
run: docker exec lamp-stack_apache_1 php -m | grep mongo
- name: Mysql Driver check
run: docker exec lamp-stack_apache_1 php -m | grep mysqli
- name: Composer test
run: docker exec lamp-stack_apache_1 composer
- name: Web site Test
run: |
docker exec lamp-stack_apache_1 sudo wget -O /var/www/index.php https://raw.githubusercontent.com/deck-app/stack-preview-screen/main/install/index.html
sudo curl -I --http2 http://localhost:5590/
- name: Verify MariaDB running from host, create Database and show Database
run: |
while ! docker exec lamp-stack_mariadb_1 mysqladmin --user=root --password=password --host "mariadb" ping --silent &> /dev/null ; do
echo "Waiting for database connection..."
sleep 2
done
- name: Check MariaDB version
run: docker exec lamp-stack_mariadb_1 mysql -uroot -ppassword -e "SHOW VARIABLES LIKE '%version%';"
- name: Verify MariaDB database from user
run: docker exec lamp-stack_mariadb_1 mysql -uadmin -ppassword -e "SHOW DATABASES"
- name: Create a Database
run: docker exec lamp-stack_mariadb_1 mysql -uroot -ppassword -e "CREATE DATABASE deckapp"
- name: Verify Database create or not
run: docker exec lamp-stack_mariadb_1 mysql -uroot -ppassword -e "SHOW DATABASES"
- name: Database connection check
run: |
docker exec lamp-stack_apache_1 sudo wget -O /var/www/db.php https://raw.githubusercontent.com/nabad600/apache_php/master/connection.php
docker exec lamp-stack_apache_1 sudo php /var/www/db.php
- name: Destroy Container and file
run: |
docker-compose down
sudo rm -rf /tmp/app
sudo rm -rf /tmp/lamp
echo "y" | docker image prune -a
echo "y" | docker volume prune
- name: Create ENV
env:
ENV_TEST: ${{ secrets.ENV_TEST }}
run: |
echo "$ENV_TEST" > .env.test
shell: bash
- name: Notify on SUCCESS
if: ${{ SUCCESS() }}
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notification_title: "{emoji} *{job}* has {status_message}"
message_format: "*{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
footer: "Linked Repo <{repo_url}|{repo}>"
mention_users: "D056LFW47NF,"
mention_users_when: "SUCCESS"
mention_groups: "C06H0SB11JL"
mention_groups_when: "SUCCESS"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_SUCCESS }}
- name: Notify on FAIL
if: ${{ failure() }}
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notification_title: "{emoji} *{job}* has {status_message}"
message_format: "*{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
footer: "Linked Repo <{repo_url}|{repo}>"
mention_users: "D056LFW47NF"
mention_users_when: "failure,warnings"
mention_groups: "C06G95T1YH3"
mention_groups_when: "failure,warnings"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FAIL }}
LAMP-ARM64:
strategy:
matrix:
pv: ["8.2", "8.1", "8.0", "7.4", "7.3", "7.2"]
runs-on: ubuntu-22.04
name: LAMP-ARM64
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2
name: Run commands
id: runcmd
with:
arch: aarch64
distro: ubuntu22.04
run: |
uname -a
echo ::set-output name=uname::$(uname -a)
- name: Get the output
run: |
echo "The uname output was ${{ steps.runcmd.outputs.uname }}"
- name: Build the Docker image Apache php ${{ matrix.pv }}
run: docker-compose -f "docker-compose.yml" up -d --build
env:
PHP_VERSION: "${{ matrix.pv }}"
XDEBUG: true
DISPLAY_PHPERROR: true
SERVER_ROOT: /var/www/
APP_CODE_PATH_HOST: /tmp/app
DB_NAME: test
DB_USER: admin
DB_PASSWORD: password
DB_ROOT_PASSWORD: password
DATA_PATH_HOST: /tmp/lamp
MARIADB_VERSION: 10.7
- name: PHP version check
run : docker exec lamp-stack_apache_1 php -v
- name: Mongodb driver check
run: docker exec lamp-stack_apache_1 php -m | grep mongo
- name: Mysql Driver check
run: docker exec lamp-stack_apache_1 php -m | grep mysqli
- name: Composer test
run: docker exec lamp-stack_apache_1 composer
- name: Web site Test
run: |
docker exec lamp-stack_apache_1 sudo wget -O /var/www/index.php https://raw.githubusercontent.com/deck-app/stack-preview-screen/main/install/index.html
sudo curl -I --http2 http://localhost:5590/
- name: Verify MariaDB running from host, create Database and show Database
run: |
while ! docker exec lamp-stack_mariadb_1 mysqladmin --user=root --password=password --host "mariadb" ping --silent &> /dev/null ; do
echo "Waiting for database connection..."
sleep 2
done
- name: Check MariaDB version
run: docker exec lamp-stack_mariadb_1 mysql -uroot -ppassword -e "SHOW VARIABLES LIKE '%version%';"
- name: Verify MariaDB database from user
run: docker exec lamp-stack_mariadb_1 mysql -uadmin -ppassword -e "SHOW DATABASES"
- name: Create a Database
run: docker exec lamp-stack_mariadb_1 mysql -uroot -ppassword -e "CREATE DATABASE deckapp"
- name: Verify Database create or not
run: docker exec lamp-stack_mariadb_1 mysql -uroot -ppassword -e "SHOW DATABASES"
- name: Database connection check
run: |
docker exec lamp-stack_apache_1 sudo wget -O /var/www/db.php https://raw.githubusercontent.com/nabad600/apache_php/master/connection.php
docker exec lamp-stack_apache_1 sudo php /var/www/db.php
- name: Destroy Container and file
run: |
docker-compose down
sudo rm -rf /tmp/app
sudo rm -rf /tmp/lamp
echo "y" | docker image prune -a
echo "y" | docker volume prune
- name: Create ENV
env:
ENV_TEST: ${{ secrets.ENV_TEST }}
run: |
echo "$ENV_TEST" > .env.test
shell: bash
- name: Notify on SUCCESS
if: ${{ SUCCESS() }}
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notification_title: "{emoji} *{job}* has {status_message}"
message_format: "*{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
footer: "Linked Repo <{repo_url}|{repo}>"
mention_users: "D056LFW47NF,"
mention_users_when: "SUCCESS"
mention_groups: "C06H0SB11JL"
mention_groups_when: "SUCCESS"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_SUCCESS }}
- name: Notify on FAIL
if: ${{ failure() }}
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notification_title: "{emoji} *{job}* has {status_message}"
message_format: "*{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
footer: "Linked Repo <{repo_url}|{repo}>"
mention_users: "D056LFW47NF"
mention_users_when: "failure,warnings"
mention_groups: "C06G95T1YH3"
mention_groups_when: "failure,warnings"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FAIL }}
LAMP75-AMD64:
strategy:
matrix:
pv: ["7.1", "5.6"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the Docker image Apache php ${{ matrix.pv }}
run: docker-compose -f "docker-compose.yml" up -d --build
env:
PHP_VERSION: "${{ matrix.pv }}"
XDEBUG: true
DISPLAY_PHPERROR: true
SERVER_ROOT: /var/www/
APP_CODE_PATH_HOST: /tmp/app
DB_NAME: test
DB_USER: admin
DB_PASSWORD: password
DB_ROOT_PASSWORD: password
DATA_PATH_HOST: /tmp/lamp
MARIADB_VERSION: 10.7
- name: PHP version check
run : docker exec lamp-stack_apache_1 php -v
- name: Mysql Driver check
run: docker exec lamp-stack_apache_1 php -m | grep mysqli
- name: Composer test
run: docker exec lamp-stack_apache_1 composer
- name: Web site Test
run: |
docker exec lamp-stack_apache_1 sudo wget -O /var/www/index.php https://raw.githubusercontent.com/deck-app/stack-preview-screen/main/install/index.html
sudo curl -I --http2 http://localhost:5590/
- name: Verify MariaDB running from host, create Database and show Database
run: |
while ! docker exec lamp-stack_mariadb_1 mysqladmin --user=root --password=password --host "mariadb" ping --silent &> /dev/null ; do
echo "Waiting for database connection..."
sleep 2
done
- name: Check MariaDB version
run: docker exec lamp-stack_mariadb_1 mysql -uroot -ppassword -e "SHOW VARIABLES LIKE '%version%';"
- name: Verify MariaDB database from user
run: docker exec lamp-stack_mariadb_1 mysql -uadmin -ppassword -e "SHOW DATABASES"
- name: Create a Database
run: docker exec lamp-stack_mariadb_1 mysql -uroot -ppassword -e "CREATE DATABASE deckapp"
- name: Verify Database create or not
run: docker exec lamp-stack_mariadb_1 mysql -uroot -ppassword -e "SHOW DATABASES"
- name: Database connection check
run: |
docker exec lamp-stack_apache_1 sudo wget -O /var/www/db.php https://raw.githubusercontent.com/nabad600/apache_php/master/connection.php
docker exec lamp-stack_apache_1 sudo php /var/www/db.php
- name: Destroy Container and file
run: |
docker-compose down
sudo rm -rf /tmp/app
sudo rm -rf /tmp/lamp
echo "y" | docker image prune -a
echo "y" | docker volume prune
- name: Create ENV
env:
ENV_TEST: ${{ secrets.ENV_TEST }}
run: |
echo "$ENV_TEST" > .env.test
shell: bash
- name: Notify on SUCCESS
if: ${{ SUCCESS() }}
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notification_title: "{emoji} *{job}* has {status_message}"
message_format: "*{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
footer: "Linked Repo <{repo_url}|{repo}>"
mention_users: "D056LFW47NF,"
mention_users_when: "SUCCESS"
mention_groups: "C06H0SB11JL"
mention_groups_when: "SUCCESS"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_SUCCESS }}
- name: Notify on FAIL
if: ${{ failure() }}
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notification_title: "{emoji} *{job}* has {status_message}"
message_format: "*{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
footer: "Linked Repo <{repo_url}|{repo}>"
mention_users: "D056LFW47NF"
mention_users_when: "failure,warnings"
mention_groups: "C06G95T1YH3"
mention_groups_when: "failure,warnings"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FAIL }}
LAMP75-ARM64:
strategy:
matrix:
pv: ["7.1", "5.6"]
runs-on: ubuntu-22.04
name: LAMP75-ARM64
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2
name: Run commands
id: runcmd
with:
arch: aarch64
distro: ubuntu22.04
run: |
uname -a
echo ::set-output name=uname::$(uname -a)
- name: Get the output
run: |
echo "The uname output was ${{ steps.runcmd.outputs.uname }}"
- name: Build the Docker image Apache php ${{ matrix.pv }}
run: docker-compose -f "docker-compose.yml" up -d --build
env:
PHP_VERSION: "${{ matrix.pv }}"
XDEBUG: true
DISPLAY_PHPERROR: true
SERVER_ROOT: /var/www/
APP_CODE_PATH_HOST: /tmp/app
DB_NAME: test
DB_USER: admin
DB_PASSWORD: password
DB_ROOT_PASSWORD: password
DATA_PATH_HOST: /tmp/lamp
MARIADB_VERSION: 10.7
- name: PHP version check
run : docker exec lamp-stack_apache_1 php -v
- name: Mysql Driver check
run: docker exec lamp-stack_apache_1 php -m | grep mysqli
- name: Composer test
run: docker exec lamp-stack_apache_1 composer
- name: Web site Test
run: |
docker exec lamp-stack_apache_1 sudo wget -O /var/www/index.php https://raw.githubusercontent.com/deck-app/stack-preview-screen/main/install/index.html
sudo curl -I --http2 http://localhost:5590/
- name: Verify MariaDB running from host, create Database and show Database
run: |
while ! docker exec lamp-stack_mariadb_1 mysqladmin --user=root --password=password --host "mariadb" ping --silent &> /dev/null ; do
echo "Waiting for database connection..."
sleep 2
done
- name: Check MariaDB version
run: docker exec lamp-stack_mariadb_1 mysql -uroot -ppassword -e "SHOW VARIABLES LIKE '%version%';"
- name: Verify MariaDB database from user
run: docker exec lamp-stack_mariadb_1 mysql -uadmin -ppassword -e "SHOW DATABASES"
- name: Create a Database
run: docker exec lamp-stack_mariadb_1 mysql -uroot -ppassword -e "CREATE DATABASE deckapp"
- name: Verify Database create or not
run: docker exec lamp-stack_mariadb_1 mysql -uroot -ppassword -e "SHOW DATABASES"
- name: Database connection check
run: |
docker exec lamp-stack_apache_1 sudo wget -O /var/www/db.php https://raw.githubusercontent.com/nabad600/apache_php/master/connection.php
docker exec lamp-stack_apache_1 sudo php /var/www/db.php
- name: Destroy Container and file
run: |
docker-compose down
sudo rm -rf /tmp/app
sudo rm -rf /tmp/lamp
echo "y" | docker image prune -a
echo "y" | docker volume prune
- name: Create ENV
env:
ENV_TEST: ${{ secrets.ENV_TEST }}
run: |
echo "$ENV_TEST" > .env.test
shell: bash
- name: Notify on SUCCESS
if: ${{ SUCCESS() }}
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notification_title: "{emoji} *{job}* has {status_message}"
message_format: "*{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
footer: "Linked Repo <{repo_url}|{repo}>"
mention_users: "D056LFW47NF,"
mention_users_when: "SUCCESS"
mention_groups: "C06H0SB11JL"
mention_groups_when: "SUCCESS"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_SUCCESS }}
- name: Notify on FAIL
if: ${{ failure() }}
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notification_title: "{emoji} *{job}* has {status_message}"
message_format: "*{workflow}* {status_message} in <{branch_url}|{branch}> Architecture <{run_url}|{job}> Approved by ${{ github.event.head_commit.author.name }}"
footer: "Linked Repo <{repo_url}|{repo}>"
mention_users: "D056LFW47NF"
mention_users_when: "failure,warnings"
mention_groups: "C06G95T1YH3"
mention_groups_when: "failure,warnings"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FAIL }}