Skip to content

Commit dc1eb94

Browse files
authored
Update action.yml
1 parent a018074 commit dc1eb94

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

action.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ inputs:
1717
export:
1818
description: 'Save logs to artifact'
1919
required: false
20+
channel:
21+
description: 'Deployment channel (stable or pre-release)'
22+
required: false
23+
default: 'stable'
24+
tag:
25+
description: 'Docker image tag'
26+
required: false
27+
default: 'latest'
2028

2129
runs:
2230
using: composite
@@ -26,13 +34,20 @@ runs:
2634
with:
2735
ref: ${{ inputs.head }}
2836

37+
- name: Set Docker image based on channel and tag
38+
run: |
39+
if [[ "${{ inputs.channel }}" == "pre-release" ]]; then
40+
echo "DOCKER_IMAGE=callstackai/cal-staging:${{ inputs.tag }}" >> $GITHUB_ENV
41+
else
42+
echo "DOCKER_IMAGE=callstackai/cal:${{ inputs.tag }}" >> $GITHUB_ENV
43+
2944
- name: Run reviewer without export
3045
if: ${{ !inputs.export }}
3146
uses: addnab/docker-run-action@v3
3247
env:
3348
OPENAI_KEY: ${{ inputs.openai_key }}
3449
with:
35-
image: callstackai/cal:latest
50+
image: ${{ env.IMAGE }}
3651
options: -v ${{ github.workspace }}:/code
3752
run: |
3853
/reviewer \
@@ -47,7 +62,7 @@ runs:
4762
env:
4863
OPENAI_KEY: ${{ inputs.openai_key }}
4964
with:
50-
image: callstackai/cal:latest
65+
image: ${{ env.IMAGE }}
5166
options: -v ${{ github.workspace }}:/code
5267
run: |
5368
/reviewer \

0 commit comments

Comments
 (0)