From facc1f2378bf4210d25d23cc1a5823eaaede30cd Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Thu, 14 Sep 2023 10:47:24 +0900 Subject: [PATCH] Fix authentication method on PostgreSQL for Windows --- .github/workflows/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2318ae4c7f..9b891c7ed4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -179,13 +179,17 @@ jobs: - name: Start PostgreSQL on Windows # see https://www.cybertec-postgresql.com/en/postgresql-github-actions-continuous-integration/ + # (Get-Content $env:PGDATA\postgresql.conf) | foreach { $_ -replace "scram-sha-256","md5" } | Set-Content $env:PGDATA\postgresql.conf + # (Get-Content $env:PGDATA\pg_hba.conf) | foreach { $_ -replace "scram-sha-256","md5" } | Set-Content $env:PGDATA\pg_hba.conf run: | + echo $env:PGBIN >> $Env:GITHUB_PATH $pgService = Get-Service -Name postgresql* Set-Service -InputObject $pgService -Status running -StartupType automatic Start-Process -FilePath "$env:PGBIN\pg_isready" -Wait -PassThru $env:PGPASSWORD = 'root' & $env:PGBIN\createdb --owner=postgres eccube_db - echo $env:PGBIN >> $Env:GITHUB_PATH + & $env:PGBIN\psql -U postgres -c "SET password_encryption=md5;" postgres + & $env:PGBIN\psql -U postgres -c "ALTER role root with password 'root'" postgres - name: Setup PHP uses: nanasess/setup-php@master