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: ChatChat Version Docker Image CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
release: | |
types: [created] | |
workflow_dispatch: | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract tag name | |
id: extract_tag | |
run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/})" | |
- name: Build and push multi-platform Docker image to GITHUB | |
run: docker buildx build --builder ${{ steps.buildx.outputs.name }} --platform linux/amd64,linux/arm64 -t ghcr.io/${{ github.actor }}/chatchat:latest --push . |