Skip to content

Commit

Permalink
Merge pull request #191 from containers/refactor-chatbot
Browse files Browse the repository at this point in the history
Refactor chatbot workflow
  • Loading branch information
rhatdan authored Apr 8, 2024
2 parents dbfa978 + 075fbd9 commit 0ae9386
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/chatbot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ on:
# - ./recipes/natural_language_processing/chatbot/**
# - .github/workflows/chatbot.yaml

workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/chatbot
Expand All @@ -32,7 +34,6 @@ jobs:
steps:
- uses: actions/[email protected]

# required for multi-arch builds
- name: Install qemu dependency
run: |
sudo apt-get update
Expand All @@ -53,29 +54,25 @@ jobs:
with:
python-version: '3.11'

- name: Install dependencies
- name: Install Dependencies
working-directory: ./recipes/natural_language_processing/chatbot
run: make install

- name: Run Functional Tests
working-directory: ./recipes/natural_language_processing/chatbot
run: make functional_tests

- name: Login to github container registry
if: >
(github.event_name == 'push' || github.event_name == 'schedule') &&
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
uses: docker/[email protected]
- name: Login to Registry
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: redhat-actions/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push image
- name: Push Image
id: push_image
if: >
(github.event_name == 'push' || github.event_name == 'schedule') &&
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: redhat-actions/[email protected]
with:
image: ${{ steps.build_image.outputs.image }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/model_servers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ on:
# - ./model_servers/
# - .github/workflows/model_servers.yaml

workflow_dispatch:

env:
REGISTRY: ghcr.io

Expand Down Expand Up @@ -72,9 +74,9 @@ jobs:
env:
IMAGE_NAME: ${{ matrix.image_name }}

- name: Login to container registry
- name: Login to Container Registry
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: docker/[email protected]
uses: redhat-actions/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
Expand Down

0 comments on commit 0ae9386

Please sign in to comment.