-
Notifications
You must be signed in to change notification settings - Fork 2
135 lines (118 loc) · 4.35 KB
/
Copy pathdevelop.yml
File metadata and controls
135 lines (118 loc) · 4.35 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: Develop Branch Build
on:
push:
branches:
- develop
workflow_dispatch:
# Cancel in-progress runs when a new push is made to develop
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'pnpm'
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install dependencies
run: |
pnpm install --frozen-lockfile
cd packages/hermes-api && uv sync --frozen --all-groups
- name: Run pre-checks
run: |
echo "Running comprehensive pre-release checks..."
pnpm pre-check
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for hermes-app
id: meta-app
uses: docker/metadata-action@v6
with:
images: ghcr.io/${{ github.repository_owner }}/hermes-app
tags: |
type=raw,value=develop
type=sha,prefix=develop-
- name: Build and push hermes-app Docker image
uses: docker/build-push-action@v7
with:
context: .
file: ./packages/hermes-app/Dockerfile
push: true
tags: ${{ steps.meta-app.outputs.tags }}
labels: ${{ steps.meta-app.outputs.labels }}
build-args: |
VITE_HERMES_BUILD_VERSION=develop-${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
- name: Extract metadata for hermes-api
id: meta-api
uses: docker/metadata-action@v6
with:
images: ghcr.io/${{ github.repository_owner }}/hermes-api
tags: |
type=raw,value=develop
type=sha,prefix=develop-
- name: Build and push hermes-api Docker image
uses: docker/build-push-action@v7
with:
context: ./packages/hermes-api
file: ./packages/hermes-api/Dockerfile
push: true
tags: ${{ steps.meta-api.outputs.tags }}
labels: ${{ steps.meta-api.outputs.labels }}
build-args: |
HERMES_BUILD_VERSION=develop-${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
- name: Generate build summary
run: |
echo "## 🚀 Develop Build Complete" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Docker Images Published" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**hermes-app:**" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
echo "${{ steps.meta-app.outputs.tags }}" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**hermes-api:**" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
echo "${{ steps.meta-api.outputs.tags }}" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Pull Images" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
echo "docker pull ghcr.io/${{ github.repository_owner }}/hermes-app:develop" >> $GITHUB_STEP_SUMMARY
echo "docker pull ghcr.io/${{ github.repository_owner }}/hermes-api:develop" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "⚠️ These are **development builds** - not for production use!" >> $GITHUB_STEP_SUMMARY