Skip to content

feat: add useExtensionDetail hook for managing extension details state #3330

feat: add useExtensionDetail hook for managing extension details state

feat: add useExtensionDetail hook for managing extension details state #3330

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/openvsx-server-snapshot:<sha or branch>`
# Tagging rules:
# - <sha> for pushes to main 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:
- main
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Get all changed webui files
id: changed_webui_files
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
with:
files: webui/**
- name: Log in to the Container registry
if: steps.changed_webui_files.outputs.any_changed == 'true'
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.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@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.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@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
with:
context: webui
push: ${{ github.repository_owner == 'eclipse-openvsx' &&
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up JDK
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: 'temurin'
java-version: 25
- name: Get all changed server files
id: changed_server_files
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
with:
files: server/**
- name: Run Server Tests
if: steps.changed_server_files.outputs.any_changed == 'true'
run: server/gradlew --no-daemon -p server check
- name: Log in to the Container registry
if: steps.changed_server_files.outputs.any_changed == 'true'
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.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@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.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@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
with:
context: server
push: ${{ github.repository_owner == 'eclipse-openvsx' &&
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 }}