Attempt fix using docker-run-action

fflorent 3 months ago
parent 4cef071913
commit a87578c296

@ -1,27 +1,24 @@
{
"realm" : "grist",
"users" : [ {
"id" : "1564f73d-c385-4269-84da-34b40f494dea",
"createdTimestamp" : 1710254868534,
"username" : "keycloakuser",
"enabled" : true,
"totp" : false,
"emailVerified" : true,
"firstName" : "Keycloak",
"lastName" : "User",
"email" : "keycloakuser@example.com",
"credentials" : [ {
"id" : "3ceee294-209a-4187-aede-1dcfa2dac006",
"type" : "password",
"userLabel" : "Password: keycloakpassword",
"createdDate" : 1710254893700,
"secretData" : "{\"value\":\"kZZMgT2g89C+LFfigQt/qu5H9vs188wWgVK1KqnO12Q=\",\"salt\":\"ffAeQSmuJ7cGFE8rzN+f/g==\",\"additionalParameters\":{}}",
"credentialData" : "{\"hashIterations\":27500,\"algorithm\":\"pbkdf2-sha256\",\"additionalParameters\":{}}"
} ],
"disableableCredentialTypes" : [ ],
"requiredActions" : [ ],
"realmRoles" : [ "default-roles-grist" ],
"notBefore" : 0,
"groups" : [ ]
} ]
}
"id" : "1564f73d-c385-4269-84da-34b40f494dea",
"createdTimestamp" : 1710254868534,
"username" : "keycloakuser",
"enabled" : true,
"totp" : false,
"emailVerified" : true,
"firstName" : "Keycloak",
"lastName" : "User",
"email" : "keycloakuser@example.com",
"credentials" : [ {
"id" : "3ceee294-209a-4187-aede-1dcfa2dac006",
"type" : "password",
"userLabel" : "Password: keycloakpassword",
"createdDate" : 1710254893700,
"secretData" : "{\"value\":\"kZZMgT2g89C+LFfigQt/qu5H9vs188wWgVK1KqnO12Q=\",\"salt\":\"ffAeQSmuJ7cGFE8rzN+f/g==\",\"additionalParameters\":{}}",
"credentialData" : "{\"hashIterations\":27500,\"algorithm\":\"pbkdf2-sha256\",\"additionalParameters\":{}}"
} ],
"disableableCredentialTypes" : [ ],
"requiredActions" : [ ],
"realmRoles" : [ "default-roles-grist" ],
"notBefore" : 0,
"groups" : [ ]
}

@ -94,15 +94,17 @@ jobs:
run: yarn run test:common
- name: Setup Keycloak realm and client
uses: carlosthe19916/keycloak-action@0.4
uses: addnab/docker-run-action@v3
if: contains(matrix.tests, ':keycloak:')
with:
server: http://keycloak:8080/auth
username: admin
password: admin
kcadm: |
create realms -f .github/workflows/import_keycloak/grist-realm.json
create users -f .github/workflows/import_keycloak/grist-users-0.json
image: quay.io/keycloak/keycloak
options: -v ${{ github.workspace }}:/workspace
run: |
set -eu -o pipefail
cd /opt/keycloak/bin
./kcadm.sh config credentials --server http://keycloak:8080/ --realm=master --user=admin --password=admin
./kcadm.sh create realms -f /workspace/.github/workflows/import_keycloak/grist-realm.json
./kcadm.sh create users -r grist -f /workspace/.github/workflows/import_keycloak/grist-users-0.json
- name: Run server tests with minio and redis
if: contains(matrix.tests, ':server-')
@ -192,6 +194,15 @@ jobs:
env:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
# curl not being present in the keycloak container, use this trick:
# https://github.com/keycloak/keycloak/discussions/17319#discussioncomment-5192267
options: >-
--health-cmd "echo > /dev/tcp/localhost/8080"
--health-interval 20s
--health-timeout 5s
--health-retries 20
candidate:
needs: build_and_test
if: ${{ success() && github.event_name == 'push' }}

Loading…
Cancel
Save