s/add-on-script.py/entrypoint.py
This commit is contained in:
parent
ecb8dea19b
commit
a0bd4e61a1
12
README.md
12
README.md
@ -84,9 +84,9 @@ env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
```
|
||||
|
||||
### Define Add-on script
|
||||
### Define Add-on script (entrypoint.py)
|
||||
|
||||
[`Add-on-script.py`](Add-on-script.py)
|
||||
[`entrypoint.py`](entrypoint.py)
|
||||
This is the program that you will use to perform your Add-on. In this case, we use Python and the py-allspice API wrapper.
|
||||
|
||||
The first part of the program is parsing the arguments from the API contract, and the second part runs your actual Add-on. In this template example the Python script performs a connection test to AllSpice, and displays the parameters passed from the calling Workflow file.
|
||||
@ -96,17 +96,17 @@ The first part of the program is parsing the arguments from the API contract, an
|
||||
`Dockerfile`
|
||||
The Dockerfile specifies how to set up the environment and what file to run as the Add-on script.
|
||||
|
||||
In this repo template, we load Python 3.12, install modules from requirements.py, and thn run Add-on-script.py.
|
||||
In this repo template, we load Python 3.12, install modules from requirements.py, and thn run entrypoint.py.
|
||||
|
||||
```Dockerfile
|
||||
FROM python:3.12-bookworm
|
||||
|
||||
COPY requirements.txt /requirements.txt
|
||||
COPY Add-on-script.py /Add-on-script.py
|
||||
COPY entrypoint.py /entrypoint.py
|
||||
|
||||
RUN pip install -r /requirements.txt
|
||||
|
||||
ENTRYPOINT [ "/Add-on-script.py" ]
|
||||
ENTRYPOINT [ "/entrypoint.py" ]
|
||||
```
|
||||
|
||||
### requirements.txt
|
||||
@ -126,7 +126,7 @@ pyyaml~=6.0
|
||||
|
||||
### Testing files
|
||||
|
||||
This repo has an optional Action workflow that checks the syntax of Add-on-script.py. This is helpful because Python is an interpreted language.
|
||||
This repo has an optional Action workflow that checks the syntax of entrypoint.py. This is helpful because Python is an interpreted language.
|
||||
|
||||
You do not need these files to run your Add-on, however using tests will help you spot errors.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user