feat: add web-only filter to extension search functionality #1503 #2725
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| env: | |
| REGISTRY: ghcr.io | |
| SERVER_IMAGE: openvsx-server | |
| WEBUI_IMAGE: openvsx-webui | |
| jobs: | |
| build-and-push-cli-and-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: Set up Node.js | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version: 18.x | |
| - name: Install Yarn | |
| run: | | |
| corepack enable | |
| corepack prepare yarn@stable --activate | |
| - name: Build CLI | |
| run: yarn --cwd cli | |
| - name: Get all changed webui files | |
| id: changed_webui_files | |
| uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.0 | |
| 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=sha,prefix= | |
| labels: | | |
| org.opencontainers.image.title=OpenVSX WebUI | |
| - 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 | |
| # only push to ghcr.io in the upstream repo when pushing to the master branch | |
| push: ${{ github.repository_owner == 'eclipse' && github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
| 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@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47.0.0 | |
| 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=sha,prefix= | |
| labels: | | |
| org.opencontainers.image.title=OpenVSX Server | |
| - 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 | |
| # only push to ghcr.io in the upstream repo when pushing to the master branch | |
| push: ${{ github.repository_owner == 'eclipse' && github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
| 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@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: PR_NUMBER | |
| path: PR_NUMBER.txt |