Compare commits

...

18 commits

Author SHA1 Message Date
cb07313509 Remove obsolete Renovate config
* Git author is set via access token (renovate-bot)
* Ignored Git and PR authors should not be necessary, anymore 🤞
2025-01-03 20:08:00 +00:00
f7add5ec47
Looks like setting the LOG_LEVEL variable in the env section does not work
Setting it before the npx command does
2025-01-03 16:20:01 +01:00
0fc7d91348
Always save the Renovate log 2025-01-03 16:16:27 +01:00
1341c241bd
Replace Renovate autodiscovery with explicitly setting the repository 2025-01-03 16:16:27 +01:00
6d355fc5bd
Allow manual trigger of Renovate workflow 2025-01-03 15:55:49 +01:00
d18513fb76
Downgrade upload-artifact action again
v4 causes an error
2025-01-03 15:55:09 +01:00
d10f8d6d90
Replace elaborate checks for Java version with single one for Java 11 2025-01-03 15:54:42 +01:00
66fa98353e
Add the actual version string to helma.main.Server again 2025-01-03 15:54:42 +01:00
c2b37a8243
Update workflows for Forgejo runner 2025-01-03 13:35:33 +01:00
0c9b00dbb1 Merge pull request 'Update actions/upload-artifact action to v4' (#122) from renovate/major-github-artifact-actions into helma-🐜
Reviewed-on: #122
2025-01-03 12:01:15 +00:00
c1e9371f6b Update .github/workflows/renovate.yml 2025-01-03 11:59:50 +00:00
3284a1ca19 Update actions/upload-artifact action to v4 2025-01-03 11:57:30 +00:00
cbb6599ce0 Add Renovate workflow 2025-01-03 11:46:46 +00:00
49c1be97bb
Merge pull request #75 from antville/renovate/org.mozilla-rhino-1.x
Update dependency org.mozilla:rhino to v1.8.0
2025-01-03 11:08:53 +01:00
31bdcc6c27
Merge remote-tracking branch 'origin/renovate/org.mozilla-rhino-1.x' into renovate/org.mozilla-rhino-1.x 2025-01-03 11:01:24 +01:00
renovate[bot]
28887aaccd
Update dependency org.mozilla:rhino to v1.8.0 2025-01-03 09:32:00 +00:00
f7fe09a294
Switch to rhino-all.jar, Helma needs the full Rhino experience 2025-01-03 09:53:53 +01:00
renovate[bot]
4ebbcb01ae
Update dependency org.mozilla:rhino to v1.8.0 2025-01-03 08:07:29 +00:00
6 changed files with 53 additions and 47 deletions

View file

@ -4,19 +4,12 @@ on: workflow_dispatch
jobs:
deploy:
runs-on: ubuntu-latest
runs-on: antville
environment:
name: weblogs.at
url: https://weblogs.at
steps:
- name: Set up SSH agent
uses: antville/helma/.github/actions/ssh@helma-🐜
with:
config: ${{ vars.SSH_CONFIG }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
known-hosts: ${{ vars.SSH_KNOWN_HOSTS }}
- name: Copy files to production server
run: ssh staging-server deploy-helma

View file

@ -10,7 +10,7 @@ permissions:
jobs:
build:
runs-on: ubuntu-latest
runs-on: antville
env:
GH_TOKEN: ${{ github.token }}
@ -19,27 +19,20 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle
run: ./gradlew assembleDist
- name: Create release
# FIXME: Currently only outputs gh command; adapt for Forgejo
run: |
gh release create "$GITHUB_REF_NAME" \
echo gh release create "$GITHUB_REF_NAME" \
--repo "$GITHUB_REPOSITORY" \
--title "$(date +'%d %b %Y')" \
--generate-notes
- name: Upload assets
# FIXME: Currently only outputs gh command; adapt for Forgejo
run: |
gh release upload "$GITHUB_REF_NAME" \
echo gh release upload "$GITHUB_REF_NAME" \
build/distributions/helma-*.* \
--clobber

40
.github/workflows/renovate.yml vendored Normal file
View file

@ -0,0 +1,40 @@
name: Run Renovate
on:
schedule:
- cron: "13 * * * *"
workflow_dispatch:
jobs:
renovate:
runs-on: antville
steps:
- uses: actions/checkout@v4
- name: Run Renovate
# See <https://docs.renovatebot.com/troubleshooting/#log-debug-levels>
# debug | info | warn | error | fatal
run: LOG_LEVEL=info npx renovate
env:
# Renovate is using this token to retrieve release notes
GITHUB_COM_TOKEN: ${{ secrets.renovate_github_com_token }}
# Autodiscover is better suited for an extra repo running Renovate on all desired repos
#RENOVATE_AUTODISCOVER: 'true'
RENOVATE_CONFIG_FILE: renovate.json
RENOVATE_ENDPOINT: ${{ github.api_url }}
RENOVATE_LOG_FILE: renovate-log.ndjson
RENOVATE_LOG_FILE_LEVEL: debug
RENOVATE_PLATFORM: gitea
RENOVATE_REPOSITORIES: ${{ github.repository }}
RENOVATE_REPOSITORY_CACHE: 'enabled'
# github.token is not working here, it lacks some permissions required by Renovate
RENOVATE_TOKEN: ${{ secrets.renovate_token }}
- name: Save log file
# FIXME: v4 of this action causes an error on Forgejo (“You must configure a GitHub token”)
uses: actions/upload-artifact@v3
if: always()
with:
name: renovate-log.ndjson
path: renovate-log.ndjson

View file

@ -4,31 +4,15 @@ on: workflow_dispatch
jobs:
stage:
runs-on: ubuntu-latest
runs-on: antville
environment:
name: stage
url: https://antville-test.online
url: ${{ vars.stage_url }}
steps:
- uses: actions/checkout@v4
- name: Set up SSH agent
uses: ./.github/actions/ssh
with:
config: ${{ vars.SSH_CONFIG }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
known-hosts: ${{ vars.SSH_KNOWN_HOSTS }}
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle
run: ./gradlew installDist

View file

@ -68,7 +68,7 @@ dependencies {
implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1'
implementation 'org.eclipse.jetty:jetty-servlet:9.4.56.v20240826'
implementation 'org.eclipse.jetty:jetty-xml:9.4.56.v20240826'
implementation 'org.mozilla:rhino:1.7.13'
implementation 'org.mozilla:rhino-all:1.8.0'
implementation 'org.sejda.imageio:webp-imageio:0.1.6'
implementation 'xerces:xercesImpl:2.12.2'
implementation 'xmlrpc:xmlrpc:2.0.1'
@ -172,6 +172,7 @@ tasks.register('processSource', Sync) {
line -> line
.replaceAll('__builddate__', new Date().format("d MMM yyyy"))
.replaceAll('__commithash__', gitOutput.toString().trim())
.replaceAll('__version__', version)
} into "${project.buildDir}/src"
}

View file

@ -36,7 +36,7 @@ import helma.util.ResourceProperties;
*/
public class Server implements Runnable {
// version string
public static final String version = "🐜";
public static final String version = "__version__";
// build date
public static final String buildDate = "__builddate__";
@ -151,13 +151,8 @@ public class Server implements Runnable {
public static void checkJavaVersion() {
String javaVersion = System.getProperty("java.version");
if ((javaVersion == null) || javaVersion.startsWith("1.5")
|| javaVersion.startsWith("1.4")
|| javaVersion.startsWith("1.3")
|| javaVersion.startsWith("1.2")
|| javaVersion.startsWith("1.1")
|| javaVersion.startsWith("1.0")) {
System.err.println("This version of Helma requires Java 1.6 or greater.");
if ((javaVersion == null) || !javaVersion.startsWith("11")) {
System.err.println("This version of Helma requires Java 11 or greater.");
if (javaVersion == null) { // don't think this will ever happen, but you never know
System.err.println("Your Java Runtime did not provide a version number. Please update to a more recent version.");