How to pass a command to MySQL service in github actions.

I am trying to pass the following command to a mysql service. --default-authentication-plugin=mysql_native_password

in docker-compose this is quite simple:

version: '3.7'
services:
  mysql_db_container:
    image: mysql:latest
    command: --default-authentication-plugin=mysql_native_password
    environment:
      MYSQL_ROOT_PASSWORD: password
    ports:
      - 3306:3306
    volumes:
      - mysql_db_data_container:/var/lib/mysql

volumes:
  mysql_db_data_container:

How do i do this using github action services.

ci.yml

services:
      mysql:
        image: mysql
        env:
          MYSQL_ROOT_PASSWORD: password
          MYSQL_DATABASE: some-db
        ports:
            - '3306:3306'
        options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

@kaykhan ,

Currently, GitHub Actions seems does not support this feature.
As a workaround, maybe you can try to custom a Docker image based on the mysql:latest ( FROM mysql:latest ), via using a Dockerfile and docker-compose. The you can add this command in the the custom image.

+1, looking for env var support at the service image level.