mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 12:56:30 +01:00
CI: Reverting and moving to SQL
This commit is contained in:
parent
c5fadb009e
commit
363296022d
2 changed files with 9 additions and 5 deletions
13
.github/actions/setup-database/action.yml
vendored
13
.github/actions/setup-database/action.yml
vendored
|
|
@ -43,11 +43,16 @@ runs:
|
|||
echo "MySQL is ready"
|
||||
shell: bash
|
||||
|
||||
- name: Set up MySQL Privileges
|
||||
- name: Set up MySQL Configuration and Privileges
|
||||
if: ${{ inputs.database == 'mysql' }}
|
||||
run: |
|
||||
# Note: MySQL server configuration (character set, collation, row format) is set
|
||||
# at container startup via the mysql.cnf config file mounted in the workflow
|
||||
# Set MySQL global variables for character set, collation, and row format
|
||||
# These must be set before migrations run to ensure tables are created with correct settings
|
||||
mysql -u root -proot_password -h 127.0.0.1 mysql <<EOF
|
||||
SET GLOBAL character_set_server = 'utf8mb4';
|
||||
SET GLOBAL collation_server = 'utf8mb4_unicode_ci';
|
||||
SET GLOBAL innodb_default_row_format = 'DYNAMIC';
|
||||
EOF
|
||||
# Ensure user exists and has proper privileges
|
||||
mysql -u root -proot_password -h 127.0.0.1 mysql <<EOF
|
||||
CREATE USER IF NOT EXISTS 'evennia'@'%' IDENTIFIED BY 'password';
|
||||
|
|
@ -55,7 +60,7 @@ runs:
|
|||
GRANT PROCESS ON *.* TO 'evennia'@'%';
|
||||
FLUSH PRIVILEGES;
|
||||
EOF
|
||||
# Set database character set (server defaults are set via config file, but ensure DB matches)
|
||||
# Set database character set and collation
|
||||
mysql -u root -proot_password -h 127.0.0.1 evennia <<EOF
|
||||
ALTER DATABASE evennia CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
EOF
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@ jobs:
|
|||
--health-interval=10s
|
||||
--health-timeout=5s
|
||||
--health-retries=3
|
||||
--entrypoint="/bin/sh -c \"printf '[mysqld]\ncharacter-set-server=utf8mb4\ncollation-server=utf8mb4_unicode_ci\ninnodb-default-row-format=DYNAMIC\n' > /etc/mysql/conf.d/custom.cnf && exec /usr/local/bin/docker-entrypoint.sh mysqld\""
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue