This repository was archived by the owner on Nov 1, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
57 lines (49 loc) · 1.58 KB
/
docker-run-api.yml
File metadata and controls
57 lines (49 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Docker inkeep/agents-run-api
on:
push:
branches: [main]
jobs:
build-and-push:
name: Build and Push
runs-on: ubuntu-latest
steps:
# 1. Checkout source code
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetches full history for better caching/context
# 2. Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# 3. Cache Docker layers
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: ${{ runner.os }}-buildx-
# 4. Extract metadata
- name: Extract metadata
id: meta
run: |
echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> "$GITHUB_OUTPUT"
echo "SHORT_SHA=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
# 5. Login to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# 6. Build and push image
- name: Build and push production image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.run-api
push: true
platforms: linux/amd64,linux/arm64
tags: |
inkeep/agents-run-api:latest
inkeep/agents-run-api:${{ steps.meta.outputs.SHORT_SHA }}
cache-from: type=gha
cache-to: type=gha,mode=max