Skip to content

chore(Rest): Remove verbs from Rest and keep verb's to #263

chore(Rest): Remove verbs from Rest and keep verb's to

chore(Rest): Remove verbs from Rest and keep verb's to #263

Workflow file for this run

name: πŸ“¦ Build npm Package
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
permissions:
id-token: write # Required for OIDC
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v2
if: (github.event_name == 'push' && github.repository == 'KaotoIO/camel-catalog') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
id: app-token
with:
app-id: ${{ vars.KAOTO_RELEASE_APP_ID }}
private-key: ${{ secrets.KAOTO_RELEASE_APP_KEY }}
- name: πŸ›ŽοΈ Checkout source code
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token || github.token }}
- name: 🧰 Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
scope: '@kaoto'
cache: 'yarn'
- name: β˜• Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Install dependencies
run: yarn
- name: πŸ“¦ Build the catalog
run: yarn build
- name: πŸ’… Run eslint
run: yarn lint
- name: πŸ” Check for uncommitted catalog changes
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "❌ Uncommitted changes detected after building the catalog."
echo ""
echo "πŸ”§ It looks like the catalog generator has been modified, but the generated files in the 'catalog/' folder were not committed."
echo ""
echo "βœ… To fix this:"
echo " 1. Run 'yarn build' (this builds the catalog and copies it to the root 'catalog/' folder)."
echo " 2. Commit the updated files using:"
echo " git add catalog && git commit -m \"Update generated catalog\""
echo ""
echo "πŸ” This ensures that the repository always reflects the current state of the generator."
echo ""
git status
exit 1
else
echo "βœ… Catalog is up-to-date."
fi
- name: πŸ“€ Upload artifacts for publish (only on main)
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'KaotoIO/camel-catalog'
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
yarn publish