Skip to content

v1.6.7-beta6 fix bugs #43

v1.6.7-beta6 fix bugs

v1.6.7-beta6 fix bugs #43

name: Build Docker Image (dev)
on:
push:
branches:
- dev
paths-ignore:
- 'README.md'
- 'docker-compose.yml'
- 'docker-compose-warp.yml'
- 'docs/**'
- '.github/workflows/build_docker_main.yml'
- '.github/workflows/build_docker_dev.yml'
workflow_dispatch:
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Read the version from version.txt
id: get_version
run: |
version=$(cat version.txt)
echo "Current version: v$version-dev"
echo "::set-output name=version::v$version-dev"
- name: Commit and push version tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
version=${{ steps.get_version.outputs.version }}
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git tag "$version"
git push https://x-access-token:${GHCR_PAT}@github.com/lanqian528/chat2api.git "$version"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: lanqian528/chat2api
tags: |
type=raw,value=latest-dev
type=raw,value=${{ steps.get_version.outputs.version }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
file: Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}