Skip to content

Commit

Permalink
support mariadb
Browse files Browse the repository at this point in the history
  • Loading branch information
getong committed Dec 8, 2019
1 parent 4dd1210 commit fe9e696
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This [GitHub Action](https://github.com/features/actions) sets up a MySQL databa

```yaml
steps:
- uses: samin/mysql-action@v1
- uses: getong/mariadb-action@v1.4
with:
host port: 3800 # Optional, default value is 3306. The port of host
container port: 3307 # Optional, default value is 3306. The port of container
Expand All @@ -19,7 +19,7 @@ steps:
mysql password: ${{ secrets.DatabasePassword }} # Required if "mysql user" exists. The password for the "mysql user"
```
See [Docker Hub](https://hub.docker.com/_/mysql) for available versions.
See [Docker Hub](https://hub.docker.com/_/mariadb) for available versions.
See [Creating and using secrets (encrypted variables)](https://help.github.com/en/articles/virtual-environments-for-github-actions#creating-and-using-secrets-encrypted-variables) for hiding database password.
Expand Down
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 'Start MySQL'
description: 'Start a MySQL database'
author: 'Samin Shams'
name: 'Start MariaDB'
description: 'Start a MariaDB database'
author: 'getong'
branding:
icon: 'database'
color: 'green'
Expand Down
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ elif [ -n "$INPUT_MYSQL_USER" ]; then
docker_run="$docker_run -e MYSQL_RANDOM_ROOT_PASSWORD=true -e MYSQL_USER=$INPUT_MYSQL_USER -e MYSQL_PASSWORD=$INPUT_MYSQL_PASSWORD"
else
echo "Using empty password for root"

docker_run="$docker_run -e MYSQL_ALLOW_EMPTY_PASSWORD=true"
fi

Expand All @@ -27,7 +27,7 @@ if [ -n "$INPUT_MYSQL_DATABASE" ]; then
docker_run="$docker_run -e MYSQL_DATABASE=$INPUT_MYSQL_DATABASE"
fi

docker_run="$docker_run -d -p $INPUT_HOST_PORT:$INPUT_CONTAINER_PORT mysql:$INPUT_MYSQL_VERSION --port=$INPUT_CONTAINER_PORT"
docker_run="$docker_run -d -p $INPUT_HOST_PORT:$INPUT_CONTAINER_PORT mariadb:$INPUT_MYSQL_VERSION --port=$INPUT_CONTAINER_PORT"
docker_run="$docker_run --character-set-server=$INPUT_CHARACTER_SET_SERVER --collation-server=$INPUT_COLLATION_SERVER"

sh -c "$docker_run"

0 comments on commit fe9e696

Please sign in to comment.