Compare commits

..
Author SHA1 Message Date
aandClaude Opus 4.6 d86afba440 Add workflow to clear all GitHub Actions caches
Runs on push to this branch and via manual workflow_dispatch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 10:52:16 +01:00
Anthony Stirlinganda ebab5a4456 pipeline fixes (#6068)
Co-authored-by: a <a>
2026-04-04 10:19:38 +01:00
6 changed files with 67 additions and 5 deletions
+56
View File
@@ -0,0 +1,56 @@
name: Clear GitHub Actions Cache
on:
workflow_dispatch:
push:
branches:
- clear-github-cache
jobs:
clear-cache:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- name: Clear all caches
uses: actions/github-script@v7
with:
script: |
const caches = await github.rest.actions.getActionsCacheList({
owner: context.repo.owner,
repo: context.repo.repo,
per_page: 100,
});
let deleted = 0;
for (const cache of caches.data.actions_caches) {
console.log(`Deleting cache: ${cache.key} (${cache.id})`);
await github.rest.actions.deleteActionsCacheById({
owner: context.repo.owner,
repo: context.repo.repo,
cache_id: cache.id,
});
deleted++;
}
// Handle pagination if more than 100 caches
let totalCount = caches.data.total_count;
while (deleted < totalCount) {
const moreCaches = await github.rest.actions.getActionsCacheList({
owner: context.repo.owner,
repo: context.repo.repo,
per_page: 100,
});
if (moreCaches.data.actions_caches.length === 0) break;
for (const cache of moreCaches.data.actions_caches) {
console.log(`Deleting cache: ${cache.key} (${cache.id})`);
await github.rest.actions.deleteActionsCacheById({
owner: context.repo.owner,
repo: context.repo.repo,
cache_id: cache.id,
});
deleted++;
}
}
console.log(`Successfully deleted ${deleted} caches.`);
@@ -37,6 +37,7 @@ import stirling.software.SPDF.model.PipelineConfig;
import stirling.software.SPDF.model.PipelineOperation;
import stirling.software.SPDF.model.PipelineResult;
import stirling.software.SPDF.service.ApiDocService;
import stirling.software.common.model.enumeration.Role;
import stirling.software.common.service.UserServiceInterface;
import stirling.software.common.util.TempFile;
import stirling.software.common.util.TempFileManager;
@@ -111,7 +112,12 @@ public class PipelineProcessor {
private String getApiKeyForUser() {
if (userService == null) return "";
return userService.getCurrentUserApiKey();
String username = userService.getCurrentUsername();
if (username != null && !username.equals("anonymousUser")) {
return userService.getApiKeyForUser(username);
}
// Scheduled/internal context — no user in security context
return userService.getApiKeyForUser(Role.INTERNAL_API_USER.getRoleId());
}
private String getBaseUrl() {
+1 -1
View File
@@ -78,7 +78,7 @@ springBoot {
allprojects {
group = 'stirling.software'
version = '2.9.1'
version = '2.9.2'
configurations.configureEach {
exclude group: "org.springframework.boot", module: "spring-boot-starter-tomcat"
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"productName": "Stirling-PDF",
"version": "2.9.1",
"version": "2.9.2",
"identifier": "stirling.pdf.dev",
"build": {
"frontendDist": "../dist",
@@ -38,7 +38,7 @@ const FREE_LICENSE_INFO: LicenseInfo = {
const BASE_NO_LOGIN_CONFIG: AppConfig = {
enableAnalytics: true,
appVersion: '2.9.1',
appVersion: '2.9.2',
serverCertificateEnabled: false,
enableAlphaFunctionality: false,
serverPort: 8080,
@@ -48,7 +48,7 @@ const FREE_LICENSE_INFO: LicenseInfo = {
const BASE_NO_LOGIN_CONFIG: AppConfig = {
enableAnalytics: true,
appVersion: '2.9.1',
appVersion: '2.9.2',
serverCertificateEnabled: false,
enableAlphaFunctionality: false,
enableDesktopInstallSlide: true,