mirror of
https://github.com/karl0ss/ai_image_frame_server.git
synced 2025-05-16 10:58:11 +01:00
try create workflow to auto publish new container
This commit is contained in:
parent
e43ab87922
commit
2c5dbdb219
34
.github/workflows/docker-publish.sh
vendored
Normal file
34
.github/workflows/docker-publish.sh
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
name: Build and Publish Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main] # or any other branch you want
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to custom Docker registry
|
||||
run: echo "${{ secrets.PASSWORD }}" | docker login ${{ secrets.REGISTRY }} -u "${{ secrets.USERNAME }}" --password-stdin
|
||||
|
||||
- name: Build Docker image
|
||||
run: |
|
||||
IMAGE_NAME="ai-frame-image-server"
|
||||
REGISTRY="${{ secrets.REGISTRY }}"
|
||||
USERNAME="${{ secrets.USERNAME }}"
|
||||
TAG="latest"
|
||||
FULL_IMAGE="$REGISTRY/$USERNAME/$IMAGE_NAME:$TAG"
|
||||
|
||||
echo "🔧 Building image $FULL_IMAGE"
|
||||
docker build -t $FULL_IMAGE .
|
||||
|
||||
echo "📤 Pushing $FULL_IMAGE"
|
||||
docker push $FULL_IMAGE
|
Loading…
x
Reference in New Issue
Block a user