Skip to content

Commit

Permalink
release nightly image workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
paopa committed Apr 2, 2024
1 parent dcd5d31 commit 1960fbc
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ai-service-release-nightly-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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 .

0 comments on commit 1960fbc

Please sign in to comment.