Skip to content

Commit

Permalink
Merge branch 'main' into fguo-dev1
Browse files Browse the repository at this point in the history
Signed-off-by: Fei Guo <[email protected]>
  • Loading branch information
Fei-Guo authored Oct 26, 2023
2 parents 7a5537a + 1815baa commit 77a5c66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/preset-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ on:
- 'presets/llama-2-chat/**'
workflow_dispatch:
inputs:
release:
description: 'Release (yes/no)'
required: true
default: 'no'
image_tag:
description: 'Image Tag'
required: true
Expand All @@ -29,9 +25,12 @@ permissions:
id-token: write
contents: read

env:
VERSION: 0.0.1

jobs:
setup:
runs-on: self-hosted
runs-on: [self-hosted, username:runner-0]
outputs:
image_tag: ${{ steps.set_tag.outputs.image_tag }}
FALCON_MODIFIED: ${{ steps.check_modified_paths.outputs.FALCON_MODIFIED }}
Expand Down Expand Up @@ -97,12 +96,9 @@ jobs:
if [[ "${{ github.event_name }}" == "workflow_dispatch" && -n "${{ github.event.inputs.image_tag }}" ]]; then
echo "Using workflow dispatch to set image tag"
echo "image_tag=${{ github.event.inputs.image_tag }}" >> $GITHUB_OUTPUT
elif [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == "refs/heads/main" ]]; then
echo "Setting image tag to be latest"
echo "image_tag=latest" >> $GITHUB_OUTPUT
else
echo "Setting image tag based on latest commit"
echo "image_tag=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "Setting image tag based on version set"
echo "image_tag=${{ env.VERSION }}" >> $GITHUB_OUTPUT
fi
- name: Print Image Tag
Expand Down Expand Up @@ -179,7 +175,7 @@ jobs:
- name: 'Attach and Login to ACR'
id: acr_login
run: |
if [[ "${{ needs.setup.outputs.image_tag }}" == "latest" ]]; then
if [[ "${{ github.event_name }}" == "workflow_dispatch" && -n "${{ github.event.inputs.image_tag }}" ]]; then
ACR_NAME="aimodelsregistry"
else
ACR_NAME="aimodelsregistrytest"
Expand Down
2 changes: 1 addition & 1 deletion presets/test/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
volumes:
- name: host-volume
hostPath:
path: /actions-runner/_work/kdm/kdm
path: /home/runner-0/runner/_work/kaito/kaito
type: Directory
- name: llama-volume
hostPath:
Expand Down

0 comments on commit 77a5c66

Please sign in to comment.