Skip to content

Manually-triggered (workflow_dispatch) to generate RAML schema from publicly available router. #2

Manually-triggered (workflow_dispatch) to generate RAML schema from publicly available router.

Manually-triggered (workflow_dispatch) to generate RAML schema from publicly available router. #2

name: Manually-triggered (workflow_dispatch) to generate RAML schema from publicly available router.
on:
workflow_dispatch:
inputs:
start_path:
description: 'Starting path (space seperated)'
required: false
# release_tag:
# description: 'Release tag'
# required: true
# release_name:
# description: 'Release name'
# required: true
# release_body:
# description: 'Release description'
# required: true
jobs:
run-bun:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 'latest'
- name: Run JavaScript with Bun
run: |
bun install js-yaml raml2html raml2html-slate-theme
bun rest2raml.js ${{ github.event.inputs.param1 }}
env:
URLBASE: https://${{ secrets.ROS_HOST}}/rest
BASICAUTH: ${{ secrets.ROS_USER }}:${{ secrets.ROS_PASSWD }}
# - name: Archive results
# run: |
# mkdir -p results
# mv output.json results/ # Assuming your script generates an output.json file
# tar -czvf results.tar.gz results/
#
# - name: Create GitHub Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.event.inputs.release_tag }}
# release_name: ${{ github.event.inputs.release_name }}
# body: ${{ github.event.inputs.release_body }}
# draft: false
# prerelease: false
#
# - name: Upload release asset
# uses: actions/upload-release-asset@v1
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: results.tar.gz
# asset_name: results.tar.gz
# asset_content_type: application/gzip