Skip to content

release nightly image workflow #1

release nightly image workflow

release nightly image workflow #1

name: AI Service/release nightly image
on:
push:
branches: [main, feature/ai-service/44-*]
paths:
- 'wren-ai-service/**'
defaults:
run:
working-directory: wren-ai-service
jobs:
build-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare tag name
id: tag-preparation
run: |
tag_name=main-$(git log -1 --pretty=%h)
echo "TAG_NAME=$tag_name" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker 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: Build and push image
env:
TAG_NAME: ${{ steps.tag-preparation.outputs.TAG_NAME }}
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag ghcr.io/canner/wren-ai-service:$TAG_NAME \
--tag ghcr.io/canner/wren-ai-service:nightly \
--file ./docker/Dockerfile \
--push .