Skip to content

Commit fdd20f0

Browse files
committed
chore: update dependencies and improve scripts
- Updated genaiscript dependency from 1.142.12 to 2.3.10 in package.json. - Added "private" and "version" fields in package.json. - Modified the "upgrade" script to include a fix step after updating dependencies. - Replaced the "lint" step with "typecheck" in release.sh for better build validation. - Added a shebang and error handling in release.sh. - Created a new Dockerfile for devcontainer setup, ensuring it stays in sync with the main Dockerfile. - Added .nvmrc file to specify Node.js version as lts/*.
1 parent d350cde commit fdd20f0

File tree

10 files changed

+3207
-4349
lines changed

10 files changed

+3207
-4349
lines changed

.devcontainer/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Keep this Dockerfile in sync with the main Dockerfile
2+
FROM node:lts-alpine
3+
4+
# Install packages
5+
RUN apk add --no-cache git github-cli ffmpeg curl

.devcontainer/devcontainer.json

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
11
{
2-
"image": "mcr.microsoft.com/devcontainers/javascript-node:22",
3-
"customizations": {
4-
"vscode": {
5-
"extensions": [
6-
"github.copilot-chat",
7-
"github.vscode-pull-request-github",
8-
"github.vscode-github-actions"
2+
"name": "GenAIScript GitHub Action Dev Container",
3+
"build": {
4+
"dockerfile": "Dockerfile"
5+
},
6+
"features": {},
7+
"customizations": {
8+
"vscode": {
9+
"settings": {
10+
"terminal.integrated.defaultProfile.linux": "ash",
11+
"terminal.integrated.profiles.linux": {
12+
"ash": {
13+
"path": "/bin/ash",
14+
"args": [
15+
"-l"
916
]
17+
}
1018
}
11-
},
12-
"features": {
13-
"ghcr.io/devcontainers/features/common-utils:2": {},
14-
"ghcr.io/devcontainers/features/git:1": {},
15-
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
16-
"ghcr.io/devcontainers-extra/features/ffmpeg-apt-get:1": {},
17-
"ghcr.io/ghcr.io/devcontainers/features/github-cli:1": {}
19+
},
20+
"extensions": [
21+
"GitHub.vscode-github-actions",
22+
"esbenp.prettier-vscode",
23+
"GitHub.copilot-chat",
24+
"genaiscript.genaiscript-vscode"
25+
]
1826
}
19-
}
27+
},
28+
"postCreateCommand": "git config --global --add safe.directory \"$(pwd)\" && npm ci"
29+
}

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ permissions:
1515
contents: read
1616
issues: write
1717
models: read
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: true
1821
jobs:
1922
test:
2023
runs-on: ubuntu-latest
@@ -44,6 +47,12 @@ jobs:
4447
--health-start-period 20s
4548
steps:
4649
- uses: actions/checkout@v4
50+
- uses: actions/cache@v4
51+
with:
52+
path: .genaiscript/cache/**
53+
key: genaiscript-${{ github.run_id }}
54+
restore-keys: |
55+
genaiscript-
4756
- uses: ./
4857
with:
4958
github_issue: 1

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lts/*

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM node:lts-alpine
33

44

55
# Install packages
6-
RUN apk add --no-cache git ffmpeg curl
6+
RUN apk add --no-cache git github-cli ffmpeg curl
77

88
# check
99
RUN node --version

README.md

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,30 @@ The default behavior is to summarize and extract task items but this can be cust
55

66
## Inputs
77

8-
- `github_token`: GitHub token with `models: read` permission at least. **(required)**
9-
- `instructions`: Custom prompt to use for the LLM model. If not provided, a default prompt will be used.
10-
- `github_issue`: The issue number to analyze. Typically this variable is inferred from the event context.
11-
- `debug`: Enable debug logging.
8+
|name|description|required|default|
9+
|----|-----------|--------|-------|
10+
| `instructions` | Custom prompting instructions for each video. | false | Analyze the video and provide a summary of its content. Extract list of followup subissues if any. The transcript is your primary source of text information, ignore text in images. |
11+
| `debug` | Enable debug logging (https://microsoft.github.io/genaiscript/reference/scripts/logging/). | false | |
12+
| `model_alias` | A YAML-like list of model aliases and model id: `translation: github:openai/gpt-4o` | false | |
13+
| `openai_api_key` | OpenAI API key | false | |
14+
| `openai_api_base` | OpenAI API base URL | false | |
15+
| `azure_openai_api_endpoint` | Azure OpenAI endpoint. In the Azure Portal, open your Azure OpenAI resource, Keys and Endpoints, copy Endpoint. | false | |
16+
| `azure_openai_api_key` | Azure OpenAI API key. **You do NOT need this if you are using Microsoft Entra ID. | false | |
17+
| `azure_openai_subscription_id` | Azure OpenAI subscription ID to list available deployments (Microsoft Entra only). | false | |
18+
| `azure_openai_api_version` | Azure OpenAI API version. | false | |
19+
| `azure_openai_api_credentials` | Azure OpenAI API credentials type. Leave as 'default' unless you have a special Azure setup. | false | |
20+
| `azure_ai_inference_api_key` | Azure AI Inference key | false | |
21+
| `azure_ai_inference_api_endpoint` | Azure Serverless OpenAI endpoint | false | |
22+
| `azure_ai_inference_api_version` | Azure Serverless OpenAI API version | false | |
23+
| `azure_ai_inference_api_credentials` | Azure Serverless OpenAI API credentials type | false | |
24+
| `github_token` | GitHub token with `models: read` permission at least (https://microsoft.github.io/genaiscript/reference/github-actions/#github-models-permissions). | false | |
25+
26+
## Outputs
27+
28+
|name|description|
29+
|----|-----------|
30+
31+
| `text` | The generated text output. |
1232

1333
## Usage
1434

@@ -73,19 +93,25 @@ jobs:
7393
--health-start-period 20s
7494
steps:
7595
- uses: actions/checkout@v4
76-
- uses: pelikhan/action-genai-video-issue-analyzer@v0
96+
- uses: actions/cache@v4
97+
with:
98+
path: .genaiscript/cache/**
99+
key: genaiscript-${{ github.run_id }}
100+
restore-keys: |
101+
genaiscript-
102+
- uses: pelikhan/action-genai-video-issue-analyzer@v0 # update to the major version you want to use
77103
with:
78104
github_token: ${{ secrets.GITHUB_TOKEN }}
79105
```
80106

81107
## Development
82108

83-
This action was automatically generated by GenAIScript from the script metadata.
109+
This action was automatically generated by [GenAIScript](https://microsoft.github.io/genaiscript/reference/github-actions) from the script metadata.
84110
We recommend updating the script metadata instead of editing the action files directly.
85111

86112
- the action inputs are inferred from the script parameters
87113
- the action outputs are inferred from the script output schema
88-
- the action description is the script title
114+
- the action description is the script description
89115
- the readme description is the script description
90116
- the action branding is the script branding
91117

@@ -116,22 +142,18 @@ To run the action locally in Docker (build it first), use:
116142
npm run docker:start
117143
```
118144

119-
To run the action using [act](https://nektosact.com/), first install the act CLI:
120-
121-
```bash
122-
npm run act:install
123-
```
145+
## Upgrade
124146

125-
Then, you can run the action with:
147+
The GenAIScript version is pinned in the `package.json` file. To upgrade it, run:
126148

127149
```bash
128-
npm run act
150+
npm run upgrade
129151
```
130152

131-
## Upgrade
153+
## Release
132154

133-
The GenAIScript version is pinned in the `package.json` file. To upgrade it, run:
155+
To release a new version of this action, run the release script on a clean working directory.
134156

135157
```bash
136-
npm run upgrade
158+
npm run release
137159
```

action.yml

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: action-genai-video-issue-analyzer
1+
name: Action-Genai-Video-Issue-Analyzer
22
description: Analyzes videos upload as assets
33
inputs:
44
instructions:
@@ -7,23 +7,59 @@ inputs:
77
default: Analyze the video and provide a summary of its content. Extract list of
88
followup subissues if any. The transcript is your primary source of text
99
information, ignore text in images.
10+
debug:
11+
description: Enable debug logging
12+
(https://microsoft.github.io/genaiscript/reference/scripts/logging/).
13+
required: false
14+
model_alias:
15+
description: "A YAML-like list of model aliases and model id: `translation:
16+
github:openai/gpt-4o`"
17+
required: false
18+
openai_api_key:
19+
description: OpenAI API key
20+
required: false
21+
openai_api_base:
22+
description: OpenAI API base URL
23+
required: false
24+
azure_openai_api_endpoint:
25+
description: Azure OpenAI endpoint. In the Azure Portal, open your Azure OpenAI
26+
resource, Keys and Endpoints, copy Endpoint.
27+
required: false
28+
azure_openai_api_key:
29+
description: Azure OpenAI API key. **You do NOT need this if you are using
30+
Microsoft Entra ID.
31+
required: false
32+
azure_openai_subscription_id:
33+
description: Azure OpenAI subscription ID to list available deployments
34+
(Microsoft Entra only).
35+
required: false
36+
azure_openai_api_version:
37+
description: Azure OpenAI API version.
38+
required: false
39+
azure_openai_api_credentials:
40+
description: Azure OpenAI API credentials type. Leave as 'default' unless you
41+
have a special Azure setup.
42+
required: false
43+
azure_ai_inference_api_key:
44+
description: Azure AI Inference key
45+
required: false
46+
azure_ai_inference_api_endpoint:
47+
description: Azure Serverless OpenAI endpoint
48+
required: false
49+
azure_ai_inference_api_version:
50+
description: Azure Serverless OpenAI API version
51+
required: false
52+
azure_ai_inference_api_credentials:
53+
description: Azure Serverless OpenAI API credentials type
54+
required: false
1055
github_token:
1156
description: "GitHub token with `models: read` permission at least
1257
(https://microsoft.github.io/genaiscript/reference/github-actions/#github\
1358
-models-permissions)."
14-
required: true
15-
github_issue:
16-
description: "GitHub issue number to comment on
17-
(https://microsoft.github.io/genaiscript/reference/github-actions/#github-issue-number).
18-
The action will comment on the issue with the generated text output."
19-
required: true
20-
debug:
21-
description: Enable debug logging
22-
(https://microsoft.github.io/genaiscript/reference/scripts/logging/).
2359
required: false
24-
runs:
25-
using: docker
26-
image: Dockerfile
2760
outputs:
2861
text:
2962
description: The generated text output.
63+
runs:
64+
using: docker
65+
image: Dockerfile

0 commit comments

Comments
 (0)