-
Notifications
You must be signed in to change notification settings - Fork 801
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
Showing
38 changed files
with
1,201 additions
and
480 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
nlu: | ||
- 'data/nlu/*' | ||
- 'config.yml' | ||
|
||
core: | ||
- 'data/rules/*' | ||
- 'data/stories/*' | ||
- 'config.yml' | ||
- 'domain.yml' | ||
|
||
training: | ||
- 'data/**/*' | ||
- 'domain.yml' | ||
- 'config.yml' | ||
- 'requirements.txt' | ||
|
||
actions: | ||
- 'actions/**/*' | ||
- 'Dockerfile' | ||
|
||
deployment: | ||
- '.github/deployments/**/*' | ||
- '.github/workflows/continuous_deployment.yml' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,84 @@ | ||
name: Continuous Deployment | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
check_changed_files: | ||
name: Check for file changes | ||
runs-on: ubuntu-20.04 | ||
outputs: | ||
training: ${{ steps.changed-files.outputs.training }} | ||
actions: ${{ steps.changed-files.outputs.actions }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: RasaHQ/pr-changed-files-filter@c4f7116a04b8a4596313469429e2ad235f59d9c4 | ||
id: changed-files | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
filters: .github/change_filters.yml | ||
base: ${{ github.ref }} | ||
build-push-action-server: | ||
name: Build Action Server Docker Image | ||
needs: | ||
- check_changed_files | ||
runs-on: ubuntu-latest | ||
if: ${{ needs.check_changed_files.outputs.actions == 'true' }} | ||
steps: | ||
- name: Checkout git repository 🕝 | ||
uses: actions/checkout@v2 | ||
|
||
- name: Authenticate into Google Cloud Platform | ||
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master | ||
with: | ||
version: '275.0.0' | ||
service_account_key: ${{ secrets.GCLOUD_AUTH }} | ||
|
||
- name: Configure Docker to use Google Cloud Platform ☁️ | ||
run: | | ||
gcloud auth configure-docker | ||
- name: Pull Latest Image | ||
run: | | ||
docker pull gcr.io/replicated-test/rasa-demo:latest || true | ||
- name: Set Build ID from run ID and number | ||
run: echo "BUILD_NUMBER=$GITHUB_RUN_NUMBER-$GITHUB_RUN_ID" >> $GITHUB_ENV | ||
|
||
- name: Build Image | ||
run: | | ||
docker build -t gcr.io/replicated-test/rasa-demo:run$BUILD_NUMBER -t gcr.io/replicated-test/rasa-demo:latest --cache-from gcr.io/replicated-test/rasa-demo:latest . | ||
- name: Push PR Image to Google Cloud Container Registry | ||
run: | | ||
docker push gcr.io/replicated-test/rasa-demo | ||
train-upload-model: | ||
name: Train and Upload Model to Rasa X | ||
runs-on: ubuntu-latest | ||
needs: | ||
- check_changed_files | ||
if: ${{ needs.check_changed_files.outputs.training == 'true' }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade "pip<20" | ||
pip install -r requirements-dev.txt | ||
- name: Train Model | ||
working-directory: ${{ github.workspace }} | ||
run: | | ||
rasa train | ||
- name: Upload model | ||
env: | ||
RASA_X_API_TOKEN: ${{ secrets.RASA_X_API_TOKEN }} | ||
working-directory: ${{ github.workspace }} | ||
run: | | ||
model_path=`ls models/*.tar.gz | head -n 1` | ||
curl -k -F "model=@${model_path}" "https://website-demo.rasa.com/api/projects/default/models?api_token=${RASA_X_API_TOKEN}" | ||
Oops, something went wrong.