docs: include setup and deployment guide #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI for GHCR | |
on: | |
push: | |
branches : [ staging ] | |
jobs: | |
build: | |
name: Build image | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set SHA_SHORT | |
id: set-sha | |
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" | |
- name: Login to github | |
id: login-github | |
env: | |
TOKEN_GITHUB: ${{ secrets.TOKEN_GITHUB }} | |
IMAGE_TAG: "${{ steps.set-sha.outputs.sha_short }}" | |
run: | | |
docker login --username rquesada --password ${{ env.TOKEN_GITHUB }} ghcr.io | |
docker build --platform linux/amd64 -t ghcr.io/kwaai-ai-lab/assistant:IMAGE_TAG . | |
docker image tag ghcr.io/kwaai-ai-lab/assistant:IMAGE_TAG ghcr.io/kwaai-ai-lab/assistant:latest | |
docker push ghcr.io/kwaai-ai-lab/assistant:latest |