Skip to content

chore(links): Add Camel and Hawtio links #598

chore(links): Add Camel and Hawtio links

chore(links): Add Camel and Hawtio links #598

Workflow file for this run

name: πŸš€ Build and Deploy main
on:
push:
branches:
- main
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: 'deploy-main'
cancel-in-progress: true
jobs:
build-distribution:
runs-on: ubuntu-latest
steps:
- name: 'πŸ›°οΈ Checkout source code'
uses: actions/checkout@v4
- name: 'πŸ›°οΈ Setup Node'
uses: actions/setup-node@v4
with:
node-version: '20.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
# Build packages excluding @kaoto/camel-catalog since it was build during installing dependencies
- name: 'πŸ”§ Build packages'
run: |
yarn workspaces foreach --verbose --all --topological-dev --exclude @kaoto/camel-catalog run build
- name: 'πŸ”§ Tar UI Dist'
shell: bash
run: |
tar -czf ${{ runner.temp }}/kaoto-ui.tgz -C packages/ui/dist .
ls -lh ${{ runner.temp }}/kaoto-ui.tgz
- name: 'πŸ”§ Persist UI Dist'
uses: actions/upload-artifact@v4
with:
name: 'kaoto-ui-${{ github.run_id }}'
path: '${{ runner.temp }}/kaoto-ui.tgz'
retention-days: 1
deploy-pages:
runs-on: ubuntu-latest
needs:
- build-distribution
steps:
- name: 'πŸ›°οΈ Checkout source code'
uses: actions/checkout@v4
- name: 'πŸ›°οΈ Setup Pages'
uses: actions/configure-pages@v5
- name: 'πŸ›°οΈ Download UI Dist'
uses: actions/download-artifact@v4
with:
name: kaoto-ui-${{ github.run_id }}
path: '${{ runner.temp }}'
- name: 'πŸ›°οΈ Extract UI Dist'
shell: bash
run: |
mkdir -p packages/ui/dist
tar -xzf "${{ runner.temp }}/kaoto-ui.tgz" -C packages/ui/dist
- name: 'πŸ“€ Upload artifact @kaoto/kaoto web application'
uses: actions/upload-pages-artifact@v3
with:
path: 'packages/ui/dist'
- name: 'πŸš€ Deploy to GitHub Pages'
id: deployment
uses: actions/deploy-pages@v4
deploy-images:
if: github.repository == 'KaotoIO/kaoto'
runs-on: ubuntu-latest
needs:
- build-distribution
steps:
- name: 'πŸ›°οΈ Checkout source code'
uses: actions/checkout@v4
- name: 'πŸ›°οΈ Download UI Dist'
uses: actions/download-artifact@v4
with:
name: kaoto-ui-${{ github.run_id }}
path: '${{ runner.temp }}'
- name: 'πŸ›°οΈ Extract UI Dist'
shell: bash
run: |
mkdir -p packages/ui/dist
tar -xzf "${{ runner.temp }}/kaoto-ui.tgz" -C packages/ui/dist
- name: 'πŸ›°οΈ Login to Container Registry'
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: 'πŸ”§ Build Container Image'
shell: bash
# TODO: the container image name should be configurable via vars/secrets
run: |
docker build -t "quay.io/kaotoio/kaoto-app:main" .
- name: 'πŸ“€ Upload Container Image'
shell: bash
run: |
docker push quay.io/kaotoio/kaoto-app:main