Let the choice of kc version be auto in GH Action

This commit is contained in:
garronej 2022-04-20 12:23:28 +02:00
parent fa5f1c230a
commit 98f715e652
2 changed files with 12 additions and 8 deletions

View File

@ -19,8 +19,6 @@ export function downloadBuiltinKeycloakTheme(params: { keycloakVersion: string;
if (require.main === module) { if (require.main === module) {
(async () => { (async () => {
console.log(process.env);
const { keycloakVersion } = await promptKeycloakVersion(); const { keycloakVersion } = await promptKeycloakVersion();
const destDirPath = pathJoin(keycloakThemeBuildingDirPath, "src", "main", "resources", "theme"); const destDirPath = pathJoin(keycloakThemeBuildingDirPath, "src", "main", "resources", "theme");

View File

@ -19,13 +19,19 @@ export async function promptKeycloakVersion() {
console.log("Initialize the directory with email template from which keycloak version?"); console.log("Initialize the directory with email template from which keycloak version?");
const tags = await getLatestsSemVersionedTag({
"count": 15,
"doIgnoreBeta": true,
"owner": "keycloak",
"repo": "keycloak",
}).then(arr => arr.map(({ tag }) => tag));
if (process.env["GITHUB_ACTIONS"] === "true") {
return { "keycloakVersion": tags[0] };
}
const { value: keycloakVersion } = await cliSelect<string>({ const { value: keycloakVersion } = await cliSelect<string>({
"values": await getLatestsSemVersionedTag({ "values": tags,
"count": 15,
"doIgnoreBeta": true,
"owner": "keycloak",
"repo": "keycloak",
}).then(arr => arr.map(({ tag }) => tag)),
}).catch(() => { }).catch(() => {
console.log("Aborting"); console.log("Aborting");