Spaces:
Runtime error
Runtime error
akashyadav758 Claude Opus 4.8 (1M context) commited on
Commit ·
da8a1c1
1
Parent(s): b0a3b97
Add GitHub Actions: build & push Docker image to Docker Hub
Browse filesCo-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
.github/workflows/docker-publish.yml
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Build & Push Docker image
|
| 2 |
+
|
| 3 |
+
# Builds the stack image (headless Chrome + gpt/gemini extensions + monitor gateway)
|
| 4 |
+
# on GitHub's runners and pushes it to Docker Hub. No local Docker needed.
|
| 5 |
+
on:
|
| 6 |
+
push:
|
| 7 |
+
branches: [main]
|
| 8 |
+
paths:
|
| 9 |
+
- "Dockerfile"
|
| 10 |
+
- "start_hf.sh"
|
| 11 |
+
- "monitor/**"
|
| 12 |
+
- "profilesync/**"
|
| 13 |
+
- "free-Chatgpt-api/**"
|
| 14 |
+
- "free-gemini-api/**"
|
| 15 |
+
- ".github/workflows/docker-publish.yml"
|
| 16 |
+
workflow_dispatch: {} # allow manual "Run workflow" from the Actions tab
|
| 17 |
+
|
| 18 |
+
env:
|
| 19 |
+
IMAGE: akashyadav758/free-self-api-server
|
| 20 |
+
|
| 21 |
+
jobs:
|
| 22 |
+
build-and-push:
|
| 23 |
+
runs-on: ubuntu-latest
|
| 24 |
+
steps:
|
| 25 |
+
- name: Checkout
|
| 26 |
+
uses: actions/checkout@v4
|
| 27 |
+
|
| 28 |
+
- name: Set up Docker Buildx
|
| 29 |
+
uses: docker/setup-buildx-action@v3
|
| 30 |
+
|
| 31 |
+
- name: Log in to Docker Hub
|
| 32 |
+
uses: docker/login-action@v3
|
| 33 |
+
with:
|
| 34 |
+
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
| 35 |
+
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
| 36 |
+
|
| 37 |
+
- name: Build and push
|
| 38 |
+
uses: docker/build-push-action@v6
|
| 39 |
+
with:
|
| 40 |
+
context: .
|
| 41 |
+
file: ./Dockerfile
|
| 42 |
+
push: true
|
| 43 |
+
tags: |
|
| 44 |
+
${{ env.IMAGE }}:latest
|
| 45 |
+
${{ env.IMAGE }}:${{ github.sha }}
|
| 46 |
+
cache-from: type=gha
|
| 47 |
+
cache-to: type=gha,mode=max
|