forked from simonaszilinskas/albert-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
60 lines (55 loc) · 1.67 KB
/
action.yml
File metadata and controls
60 lines (55 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
name: Albert Code
description: "Download, install, and run Albert Code"
author: Mistral AI
inputs:
prompt:
description: The prompt to pass to the agent
required: true
default: |
You are a helpful assistant
MISTRAL_API_KEY:
description: API Key for AI Studio
required: true
install_python:
description: |
Whether or not to install Python
required: true
default: "true"
python_version:
description: |
Version of Python to install. Warning: Unsupported.
required: false
runs:
using: "composite"
steps:
- name: Install Required Python Version
if: inputs.install_python == true
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version-file: ${{ github.action_path }}/.python-version
- name: Install Requested Python Version
if: inputs.install_python && inputs.python_version
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: ${{ inputs.python_version }}
- name: Install Albert Code
shell: bash
working-directory: ${{ github.action_path }}
run: |
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -e .
- name: Run Albert Code
id: run-albert-code
shell: bash
working-directory: ${{ github.action_path }}
env:
MISTRAL_API_KEY: "${{ inputs.MISTRAL_API_KEY }}"
PROMPT_INPUT: "${{ inputs.prompt }}"
run: |
cd "${{ github.workspace }}"
"${{ github.action_path }}/.venv/bin/albert-code" \
--auto-approve \
-p "$PROMPT_INPUT"