Skip to content

Commit

Permalink
Merge pull request #128 from lmilbaum/post-merge
Browse files Browse the repository at this point in the history
Push images to registry post merge
  • Loading branch information
rhatdan authored Apr 1, 2024
2 parents 1df04d2 + 25bdc94 commit 5c03d59
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 16 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/chatbot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,8 @@ jobs:
steps:
- uses: actions/[email protected]

- name: Login to ghcr
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Buildah Action
- name: Build Image
id: build_image
uses: redhat-actions/[email protected]
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
Expand All @@ -54,3 +48,23 @@ jobs:
working-directory: ./recipes/natural_language_processing/chatbot
run: make test

- name: Login to 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]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- 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'))
uses: redhat-actions/[email protected]
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ${{ env.REGISTRY }}
31 changes: 23 additions & 8 deletions .github/workflows/model_servers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,8 @@ jobs:
steps:
- uses: actions/[email protected]

- name: Login to ghcr
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Buildah Action
- name: Build Image
id: build_image
uses: redhat-actions/[email protected]
with:
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
Expand All @@ -55,3 +49,24 @@ jobs:
- name: Run tests
working-directory: ./model_servers/llamacpp_python/
run: make test

- name: Login to 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]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- 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'))
uses: redhat-actions/[email protected]
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ${{ env.REGISTRY }}

0 comments on commit 5c03d59

Please sign in to comment.