Skip to content

Crash at startup when local storage directory is not writable #2950

Crash at startup when local storage directory is not writable

Crash at startup when local storage directory is not writable #2950

Workflow file for this run

name: CI
# This workflow will test and build the different artifacts (cli, webui, server) when necessary
# and push built docker images as snapshot to ghcr.io on the following conditions:
# - in the upstream repo (not in a fork)
# - not triggered by dependabot
# - pushes to the master branch or pull_requests to the master branch not from forks
# The package can be accessed via `ghcr.io/eclipse/openvsx-server-snapshot:<sha or branch>`
# Tagging rules:
# - <sha> for pushes to master where <sha> corresponds to the commit hash
# - <branch_name> for pushes to pull request branches, will be overwritten with any subsequent push
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
branches:
- master
env:
REGISTRY: ghcr.io
SERVER_IMAGE: openvsx-server-snapshot
WEBUI_IMAGE: openvsx-webui-snapshot
jobs:
build-cli:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 24.x
- name: Install Yarn
working-directory: cli
run: |
corepack enable
corepack prepare yarn@stable --activate
- name: Build CLI
working-directory: cli
run: yarn
build-and-push-webui:
permissions:
contents: read
packages: write
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Get all changed webui files
id: changed_webui_files
uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 # v47.0.1
with:
files: webui/**
- name: Log in to the Container registry
if: steps.changed_webui_files.outputs.any_changed == 'true'
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
if: steps.changed_webui_files.outputs.any_changed == 'true'
id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
with:
images: |
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.WEBUI_IMAGE }}
tags: |
type=raw,value=${{ github.head_ref }},enable={{is_not_default_branch}}
type=raw,value={{sha}},enable={{is_default_branch}}
labels: |
org.opencontainers.image.title=OpenVSX WebUI Snapshot
- name: Build and push Web UI Image
if: steps.changed_webui_files.outputs.any_changed == 'true'
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: webui
push: ${{ github.repository_owner == 'eclipse' &&
github.actor != 'dependabot[bot]' &&
(
github.event_name == 'push' ||
(
contains(github.event.pull_request.labels.*.name, 'snapshot') &&
github.event.pull_request.head.repo.full_name == github.repository
)
) }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-and-push-server:
permissions:
contents: read
packages: write
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Set up JDK
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
with:
distribution: 'temurin'
java-version: 25
- name: Get all changed server files
id: changed_server_files
uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 # v47.0.1
with:
files: server/**
- name: Run Server Tests
if: steps.changed_server_files.outputs.any_changed == 'true'
run: server/gradlew --no-daemon -p server check
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_API_TOKEN }}
- name: Log in to the Container registry
if: steps.changed_server_files.outputs.any_changed == 'true'
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
if: steps.changed_server_files.outputs.any_changed == 'true'
id: meta
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
with:
images: |
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.SERVER_IMAGE }}
tags: |
type=raw,value=${{ github.head_ref }},enable={{is_not_default_branch}}
type=raw,value={{sha}},enable={{is_default_branch}}
labels: |
org.opencontainers.image.title=OpenVSX Server Snapshot
- name: Build and push Server Image
if: steps.changed_server_files.outputs.any_changed == 'true'
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_API_TOKEN }}
with:
context: server
push: ${{ github.repository_owner == 'eclipse' &&
github.actor != 'dependabot[bot]' &&
(
github.event_name == 'push' ||
(
contains(github.event.pull_request.labels.*.name, 'snapshot') &&
github.event.pull_request.head.repo.full_name == github.repository
)
) }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
secret-envs: |
"dv-key=DEVELOCITY_ACCESS_KEY"
save-pr-number:
permissions:
contents: none
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Save PR number to file
run: echo ${{ github.event.number }} > PR_NUMBER.txt
- name: Archive PR number
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: PR_NUMBER
path: PR_NUMBER.txt