Skip to content

Commit

Permalink
Set up gha step for windows ci runner
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Liang <[email protected]>
  • Loading branch information
RyanL1997 committed Oct 4, 2023
1 parent 61dfac4 commit 25c6dff
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ jobs:
- name: Checkout security
uses: actions/checkout@v4

- name: Add Admin Credential
- name: Add Admin Credential on Linux
if: ${{ runner.os == 'Linux' }}
run: |
cat <<EOL >> /home/runner/work/security/security/config/internal_users.yml
admin:
Expand All @@ -62,6 +63,18 @@ jobs:
- "admin"
description: "Demo admin user"
EOL
shell: bash

- name: Add Admin Credential on Windows
if: ${{ runner.os == 'Windows' }}
run: |
Add-Content -Path D:\a\work\security\security\config\internal_users.yml -Value "admin:"
Add-Content -Path D:\a\work\security\security\config\internal_users.yml -Value " hash: `"$2a$12$VcCDgh2NDk07JGN0rjGbM.Ad41qVR/YFJcgHp0UGns5JDymv..TOG`""
Add-Content -Path D:\a\work\security\security\config\internal_users.yml -Value " reserved: true"
Add-Content -Path D:\a\work\security\security\config\internal_users.yml -Value " backend_roles:"
Add-Content -Path D:\a\work\security\security\config\internal_users.yml -Value " - `"admin`""
Add-Content -Path D:\a\work\security\security\config\internal_users.yml -Value " description: `"Demo admin user`""
shell: pwsh

- name: Build and Test
uses: gradle/gradle-build-action@v2
Expand Down

0 comments on commit 25c6dff

Please sign in to comment.