mirror of
https://github.com/camel-ai/owl.git
synced 2025-12-26 02:06:20 +08:00
add github action
This commit is contained in:
parent
26b2b4a40d
commit
f1576213a0
44
.github/workflows/docker-build.yml
vendored
Normal file
44
.github/workflows/docker-build.yml
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
name: Build and Publish Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- test-docker-build
|
||||
workflow_dispatch: # Allow manual triggering
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
name: Build and Push Docker Image
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
with:
|
||||
platforms: 'arm64,amd64'
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: .container/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
mugglejinx/owl:latest
|
||||
mugglejinx/owl:${{ github.sha }}
|
||||
cache-from: type=registry,ref=mugglejinx/owl:buildcache
|
||||
cache-to: type=registry,ref=mugglejinx/owl:buildcache,mode=max
|
||||
Loading…
x
Reference in New Issue
Block a user