Skip to content

Commit bc39bd1

Browse files
authored
chore: make tag workflow push only, make manual workflow from main (#1100)
1 parent 05c4c7e commit bc39bd1

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

.github/workflows/container.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
push:
66
tags:
77
- "*"
8-
workflow_dispatch: # This line allows manual triggering
98

109
jobs:
1110
build:
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Docker Compose Build on Main Branch
2+
3+
on:
4+
workflow_dispatch: # This line allows manual triggering
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
# Check out the repository
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
15+
# Set up Docker
16+
- name: Set up Docker
17+
uses: docker/setup-buildx-action@v1
18+
19+
# Log in to GitHub Container Registry
20+
- name: Log in to GitHub Container Registry
21+
uses: docker/login-action@v2
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
27+
# Run docker-compose build
28+
- name: Build Docker images
29+
run: |
30+
cp .env.example .env
31+
docker-compose build
32+
docker build -f Dockerfile.multi --target api-build -t librechat-api .
33+
34+
# Tag and push the images with the 'latest' tag
35+
- name: Tag image and push
36+
run: |
37+
docker tag librechat:latest ghcr.io/${{ github.repository_owner }}/librechat:latest
38+
docker push ghcr.io/${{ github.repository_owner }}/librechat:latest
39+
docker tag librechat-api:latest ghcr.io/${{ github.repository_owner }}/librechat-api:latest
40+
docker push ghcr.io/${{ github.repository_owner }}/librechat-api:latest

0 commit comments

Comments
 (0)