Skip to content

Commit 5bb5e1d

Browse files
tylergannonclaude
andcommitted
ci: add Docker Hub publish workflow
Builds and pushes to tylerguilde/cxdb:latest on push to main. Tags with both latest and short SHA. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0ecde49 commit 5bb5e1d

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and publish Docker image
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
env:
9+
IMAGE_NAME: tylerguilde/cxdb
10+
11+
jobs:
12+
build-and-push:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v3
22+
23+
- name: Log in to Docker Hub
24+
uses: docker/login-action@v3
25+
with:
26+
username: tylerguilde
27+
password: ${{ secrets.DOCKER_TOKEN }}
28+
29+
- name: Extract metadata
30+
id: meta
31+
uses: docker/metadata-action@v5
32+
with:
33+
images: ${{ env.IMAGE_NAME }}
34+
tags: |
35+
type=raw,value=latest,enable={{is_default_branch}}
36+
type=sha,prefix=
37+
38+
- name: Build and push
39+
uses: docker/build-push-action@v6
40+
with:
41+
context: .
42+
push: true
43+
tags: ${{ steps.meta.outputs.tags }}
44+
labels: ${{ steps.meta.outputs.labels }}
45+
cache-from: type=gha
46+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)