Skip to content

Commit

Permalink
Use wsl to start docker on windows take 3
Browse files Browse the repository at this point in the history
  • Loading branch information
davecramer committed Apr 25, 2024
1 parent f634958 commit 4dabad7
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 50
- name: Start PostgreSQL PGV=${{ matrix.pg_version }} TZ=${{ matrix.server_tz }} XA=${{ matrix.xa }} SSL=${{ matrix.ssl }} SCRAM=${{ matrix.scram }} CREATE_REPLICAS=${{ matrix.replication }}
- name: Start PostgreSQL Ubuntu PGV=${{ matrix.pg_version }} TZ=${{ matrix.server_tz }} XA=${{ matrix.xa }} SSL=${{ matrix.ssl }} SCRAM=${{ matrix.scram }} CREATE_REPLICAS=${{ matrix.replication }}
if: ${{ matrix.os == 'ubuntu-latest' }}
working-directory: docker/postgres-server
env:
PGV: ${{ matrix.pg_version }}
Expand All @@ -177,6 +178,26 @@ jobs:
sed -i -r '/- (543[3-4]):\1/d' docker-compose.yml
docker-compose up -d
docker-compose logs
- name: Start PostgreSQL Windows
if: ${{ matrix.os == 'windows-latest' }}
shell: wsl-bash {0}
working-directory: docker/postgres-server
env:
PGV: ${{ matrix.pg_version }}
TZ: ${{ matrix.server_tz }}
XA: ${{ matrix.xa }}
SSL: ${{ matrix.ssl }}
SCRAM: ${{ matrix.scram }}
CREATE_REPLICAS: ${{ matrix.replication }}
# The below run command is long, however, it is intentional, and it makes the output nicer in GitHub UI
run: |
echo 'Starting PostgreSQL via docker-compose down; PGV=${{ matrix.pg_version }} TZ=${{ matrix.server_tz }} XA=${{ matrix.xa }} SSL=${{ matrix.ssl }} SCRAM=${{ matrix.scram }} CREATE_REPLICAS=${{ matrix.replication }} docker-compose up'
docker-compose down -v --rmi local || true
sed -i -r '/- (543[3-4]):\1/d' docker-compose.yml
docker-compose up -d
docker-compose logs
- name: Set up Java 17 and ${{ matrix.non_ea_java_version }}, ${{ matrix.java_distribution }}, ${{ runner.arch }}
uses: actions/setup-java@v3
with:
Expand Down

0 comments on commit 4dabad7

Please sign in to comment.