Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix authentication method on PostgreSQL for Windows
Browse files Browse the repository at this point in the history
nanasess committed Sep 14, 2023
1 parent 03cac2a commit facc1f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit facc1f2

Please sign in to comment.