Skip to content

Commit

Permalink
feat: setup action
Browse files Browse the repository at this point in the history
  • Loading branch information
whilefoo committed Mar 15, 2024
1 parent 32250fe commit 0160a2f
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/compute.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Delegated Compute

on:
workflow_dispatch:
inputs:
stateId:
required: true
eventName:
required: true
eventPayload:
required: true
settings:
required: true
authToken:
required: true
ref:
required: true

jobs:
run:
runs-on: ubuntu-latest
permissions: write-all

steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}

- name: Echo inputs
run: echo ${{ inputs.settings }}

- name: Calling action
uses: ./
with:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
16 changes: 16 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Delegate Compute"
description: "UbiquiBot Delegated Compute Action"
outputs:
result: # id of output
description: "The result of a event handler"
value: ${{ steps.mainHandler.outputs.result}}
runs:
using: "composite"
steps:
- run: cd ${{ github.action_path }}
shell: bash
- run: pnpm install
shell: bash
- run: pnpm start
shell: bash
id: mainHandler
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"node": ">=20.10.0"
},
"scripts": {
"start": "tsx build/esbuild-server.ts",
"build": "tsx build/esbuild-build.ts",
"start": "tsx src/index.ts",
"format": "run-s format:lint format:prettier format:cspell",
"format:lint": "eslint --fix .",
"format:prettier": "prettier --write .",
Expand Down

0 comments on commit 0160a2f

Please sign in to comment.