Skip to content

Build and Publish Docker Images #24

Build and Publish Docker Images

Build and Publish Docker Images #24

Workflow file for this run

name: Build and Publish Docker Images
on:
workflow_dispatch:
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Docker Login to ghcr.io
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build and push chat image
uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/${{ github.repository }}/chat:${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Build and push webui image
uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/${{ github.repository }}/smartrag:${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache