Skip to content

Commit 32b2c78

Browse files
committed
Docker builds
1 parent 09a5713 commit 32b2c78

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/build-and-push.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,15 @@ jobs:
4242
cache-from: type=gha
4343
cache-to: type=gha,mode=max
4444

45+
- name: Stop and remove any existing container
46+
run: |
47+
docker stop telegrambot-openai-api || true
48+
docker rm telegrambot-openai-api || true
49+
4550
- name: Run Docker container with environment variables
4651
run: |
4752
docker run \
53+
--name telegrambot-openai-api \
4854
--env OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} \
4955
--env TELEGRAM_BOT_API_KEY=${{ secrets.TELEGRAM_BOT_API_KEY }} \
5056
-d ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest

0 commit comments

Comments
 (0)