From 1605ef37939739958756a397ed06a30dbc0f7afc Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Mon, 1 Apr 2024 19:04:37 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=B3=20hotfix:=20Tag=20Images=20Workflo?= =?UTF-8?q?w=20Update=20(#2272)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/latest-images-main.yml | 88 ------------------- .github/workflows/main-image-workflow.yml | 9 +- .../{container.yml => tag-images.yml} | 2 +- 3 files changed, 7 insertions(+), 92 deletions(-) delete mode 100644 .github/workflows/latest-images-main.yml rename .github/workflows/{container.yml => tag-images.yml} (99%) diff --git a/.github/workflows/latest-images-main.yml b/.github/workflows/latest-images-main.yml deleted file mode 100644 index 2449f1650b..0000000000 --- a/.github/workflows/latest-images-main.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: Docker Compose Build Latest Tag (Manual Dispatch) - -# The workflow is manually triggered -on: - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - # Check out the repository - - name: Checkout - uses: actions/checkout@v4 - - # Fetch all tags and set the latest tag - - name: Fetch tags and set the latest tag - run: | - git fetch --tags - echo "LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_ENV - - # Set up Docker - - name: Set up Docker - uses: docker/setup-buildx-action@v3 - - # Set up QEMU - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - # 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 }} - - # Prepare Docker Build - - name: Build Docker images - run: cp .env.example .env - - # Docker metadata for librechat-api - - name: Docker metadata for librechat-api - id: meta-librechat-api - uses: docker/metadata-action@v5 - with: - images: ghcr.io/${{ github.repository_owner }}/librechat-api - tags: | - type=raw,value=${{ env.LATEST_TAG }},enable=true - type=raw,value=latest,enable=true - type=semver,pattern={{version}} - type=semver,pattern={{major}} - type=semver,pattern={{major}}.{{minor}} - - # Build and push librechat-api - - name: Build and push librechat-api - uses: docker/build-push-action@v5 - with: - file: Dockerfile.multi - context: . - push: true - tags: ${{ steps.meta-librechat-api.outputs.tags }} - platforms: linux/amd64,linux/arm64 - target: api-build - - # Docker metadata for librechat - - name: Docker metadata for librechat - id: meta-librechat - uses: docker/metadata-action@v5 - with: - images: ghcr.io/${{ github.repository_owner }}/librechat - tags: | - type=raw,value=${{ env.LATEST_TAG }},enable=true - type=raw,value=latest,enable=true - type=semver,pattern={{version}} - type=semver,pattern={{major}} - type=semver,pattern={{major}}.{{minor}} - - # Build and push librechat - - name: Build and push librechat - uses: docker/build-push-action@v5 - with: - file: Dockerfile - context: . - push: true - tags: ${{ steps.meta-librechat.outputs.tags }} - platforms: linux/amd64,linux/arm64 - target: node diff --git a/.github/workflows/main-image-workflow.yml b/.github/workflows/main-image-workflow.yml index 2a055f4d19..43c9d95753 100644 --- a/.github/workflows/main-image-workflow.yml +++ b/.github/workflows/main-image-workflow.yml @@ -25,12 +25,15 @@ jobs: git fetch --tags echo "LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_ENV - - name: Set up Docker - uses: docker/setup-buildx-action@v3 - + # Set up QEMU - name: Set up QEMU uses: docker/setup-qemu-action@v3 + # Set up Docker Buildx + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + # Log in to GitHub Container Registry - name: Log in to GitHub Container Registry uses: docker/login-action@v2 with: diff --git a/.github/workflows/container.yml b/.github/workflows/tag-images.yml similarity index 99% rename from .github/workflows/container.yml rename to .github/workflows/tag-images.yml index 2480405eb4..e90f43978a 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/tag-images.yml @@ -3,7 +3,7 @@ name: Docker Images Build on Tag on: push: tags: - - 'v*' + - '*' jobs: build: