-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9cd651
commit 14b925b
Showing
33 changed files
with
1,375 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ CHANGELOG.txt | |
.pre-commit-config.yaml | ||
changelog/* | ||
gha-creds-*.json | ||
**/gha-creds-*.json | ||
**/gha-creds-*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Authenticate to AWS ECR | ||
description: Encapsulates steps for Authenticating to ECR | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
inputs: | ||
AWS_REGION: | ||
description: 'AWS Region' | ||
required: true | ||
AWS_ARN_ROLE_TO_ASSUME: | ||
description: 'AWS role ARN' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@8c3f20df09ac63af7b3ae3d7c91f105f857d8497 # v3.0.1 | ||
with: | ||
role-to-assume: ${{ inputs.AWS_ARN_ROLE_TO_ASSUME }} | ||
aws-region: ${{ inputs.AWS_REGION }} | ||
|
||
- name: Login to Amazon ECR | ||
id: login-ecr | ||
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1 | ||
with: | ||
mask-password: "true" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Debug custom actions integration test containers | ||
description: Encapsulates steps for custom actions test debugging | ||
|
||
inputs: | ||
COMPOSE_FILE_PATH: | ||
description: 'Custom action docker compose path' | ||
required: true | ||
RASA_SDK_REPOSITORY: | ||
description: 'Rasa SDK repository path' | ||
required: true | ||
RASA_SDK_IMAGE_TAG: | ||
description: 'Rasa SDK image tag' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
|
||
steps: | ||
- name: List containers | ||
run: sudo docker ps -a | ||
shell: bash | ||
|
||
- name: Check logs for action server without TLS | ||
env: | ||
RASA_SDK_REPOSITORY: ${{ inputs.RASA_SDK_REPOSITORY }} | ||
RASA_SDK_IMAGE_TAG: ${{ inputs.RASA_SDK_IMAGE_TAG }} | ||
run: | | ||
docker compose -f ${{ inputs.COMPOSE_FILE_PATH }} \ | ||
logs action-server-grpc-no-tls | ||
shell: bash | ||
|
||
- name: Check logs for action server with TLS | ||
env: | ||
RASA_SDK_REPOSITORY: ${{ inputs.RASA_SDK_REPOSITORY }} | ||
RASA_SDK_IMAGE_TAG: ${{ inputs.RASA_SDK_IMAGE_TAG }} | ||
run: | | ||
docker compose -f ${{ inputs.COMPOSE_FILE_PATH }} \ | ||
logs action-server-grpc-tls | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
FROM ubuntu:22.04 AS base | ||
|
||
# hadolint ignore=DL3005,DL3008 | ||
RUN apt-get update -qq \ | ||
# Make sure that all security updates are installed | ||
&& apt-get dist-upgrade -y --no-install-recommends \ | ||
&& apt-get install -y --no-install-recommends \ | ||
python3 \ | ||
python3-venv \ | ||
python3-pip \ | ||
python3-dev \ | ||
&& apt-get autoremove -y \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 100 \ | ||
&& update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 100 | ||
|
||
FROM base AS python_builder | ||
|
||
ARG POETRY_VERSION=1.8.2 | ||
|
||
# hadolint ignore=DL3008 | ||
RUN apt-get update -qq \ | ||
&& apt-get install -y --no-install-recommends \ | ||
curl \ | ||
&& apt-get autoremove -y | ||
|
||
# install poetry | ||
# keep this in sync with the version in pyproject.toml and Dockerfile | ||
ENV POETRY_VERSION=$POETRY_VERSION | ||
ENV PYTHONUNBUFFERED=1 | ||
ENV PYTHONIOENCODING="utf-8" | ||
|
||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
RUN curl -sSL https://install.python-poetry.org | python | ||
ENV PATH="/root/.local/bin:/opt/venv/bin:${PATH}" | ||
|
||
# install dependencies | ||
COPY . /app/ | ||
|
||
WORKDIR /app | ||
|
||
# hadolint ignore=SC1091,DL3013 | ||
# install dependencies and build wheels | ||
RUN python -m venv /opt/venv && \ | ||
. /opt/venv/bin/activate && \ | ||
pip install --no-cache-dir -U pip && \ | ||
pip install --no-cache-dir wheel && \ | ||
poetry install --no-root --no-interaction | ||
|
||
# build the Rasa SDK wheel and install it | ||
# hadolint ignore=SC1091,DL3013 | ||
RUN poetry build -f wheel -n && \ | ||
pip install --no-deps dist/*.whl && \ | ||
rm -rf dist *.egg-info | ||
|
||
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ | ||
&& rm -rf /root/.cache/pip/* | ||
|
||
EXPOSE 5055 | ||
ENTRYPOINT [""] |
Oops, something went wrong.