Skip to content

Commit

Permalink
chore: make tag workflow push only, make manual workflow from main (d…
Browse files Browse the repository at this point in the history
  • Loading branch information
danny-avila authored Oct 24, 2023
1 parent 05c4c7e commit bc39bd1
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
push:
tags:
- "*"
workflow_dispatch: # This line allows manual triggering

jobs:
build:
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/latest-images-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Docker Compose Build on Main Branch

on:
workflow_dispatch: # This line allows manual triggering

jobs:
build:
runs-on: ubuntu-latest

steps:
# Check out the repository
- name: Checkout
uses: actions/checkout@v2

# Set up Docker
- name: Set up Docker
uses: docker/setup-buildx-action@v1

# Log in to GitHub Container Registry
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Run docker-compose build
- name: Build Docker images
run: |
cp .env.example .env
docker-compose build
docker build -f Dockerfile.multi --target api-build -t librechat-api .
# Tag and push the images with the 'latest' tag
- name: Tag image and push
run: |
docker tag librechat:latest ghcr.io/${{ github.repository_owner }}/librechat:latest
docker push ghcr.io/${{ github.repository_owner }}/librechat:latest
docker tag librechat-api:latest ghcr.io/${{ github.repository_owner }}/librechat-api:latest
docker push ghcr.io/${{ github.repository_owner }}/librechat-api:latest

0 comments on commit bc39bd1

Please sign in to comment.