Skip to content

Commit 62aea71

Browse files
authored
Merge pull request #3 from weaponsforge/dev
v0.0.0
2 parents 3f7b850 + fab7609 commit 62aea71

File tree

2 files changed

+85
-1
lines changed

2 files changed

+85
-1
lines changed

.github/workflows/release.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# This workflow deploys the production Docker image to Docker Hub
2+
3+
name: Publish to Docker Hub
4+
5+
on:
6+
release:
7+
types: [published]
8+
9+
env:
10+
REGISTRY: docker.io
11+
IMAGE_NAME: weaponsforge/gemini-cli
12+
13+
jobs:
14+
docker-build-push:
15+
name: Build and Push Docker Image
16+
if: github.event.release.target_commitish == 'master' && vars.DOCKERHUB_USERNAME != ''
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
packages: write
21+
steps:
22+
- name: Checkout the repository
23+
uses: actions/checkout@v4
24+
with:
25+
ref: ${{ github.event.release.tag_name }}
26+
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v3
29+
30+
- name: Log in to Docker Hub
31+
uses: docker/login-action@v3
32+
with:
33+
registry: ${{ env.REGISTRY }}
34+
username: ${{ secrets.DOCKERHUB_USERNAME }}
35+
password: ${{ secrets.DOCKERHUB_TOKEN }}
36+
37+
- name: Extract metadata
38+
id: meta
39+
uses: docker/metadata-action@v5
40+
with:
41+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
42+
tags: |
43+
type=ref,event=branch
44+
type=ref,event=pr
45+
type=semver,pattern={{version}}
46+
type=semver,pattern={{major}}.{{minor}}
47+
type=raw,value=latest,enable={{is_default_branch}}
48+
49+
- name: Build and push Docker image
50+
uses: docker/build-push-action@v5
51+
with:
52+
context: .
53+
file: ./Dockerfile
54+
platforms: linux/amd64,linux/arm64
55+
push: true
56+
tags: ${{ steps.meta.outputs.tags }}
57+
labels: ${{ steps.meta.outputs.labels }}
58+
cache-from: type=gha
59+
cache-to: type=gha,mode=max
60+
build-args: |
61+
BUILDKIT_INLINE_CACHE=1
62+
63+
- name: Scan image for vulnerabilities
64+
uses: aquasecurity/[email protected]
65+
with:
66+
image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }}
67+
format: 'sarif'
68+
output: 'trivy-results.sarif'
69+
70+
- name: Upload Trivy scan results to GitHub Security tab
71+
uses: github/codeql-action/upload-sarif@v3
72+
if: always()
73+
with:
74+
sarif_file: 'trivy-results.sarif'

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ This repository contains Docker files and recommended configurations for a quick
1111
- Windows OS (Docker Desktop): Docker version 27.4.0, build bde2b89
1212
- Linux/Mac OS: _(applicable Docker versions)_
1313

14+
15+
Demo
16+
17+
https://github.com/user-attachments/assets/7e7edb8c-3b97-4933-b2a6-14c48e54c0c7
18+
1419
## 🛠️ Installation
1520

1621
1. Clone this repository.
@@ -26,10 +31,15 @@ This repository contains Docker files and recommended configurations for a quick
2631
- See the [projects/README.md](projects/README.md) file for more details on organizing your project repositories.
2732
- **INFO:** this step is optional since the Gemini CLI does not require code repositories to answer general prompts.
2833

29-
4. Build the Docker image.
34+
4. **Local build:** build the Docker image.
3035
- Run this command only during the **initial installation** or if there are **changes to the `Dockerfile`**.<br>
3136
- `docker compose build`
3237

38+
5. **Pull the pre-built Docker image**: (Optional) This repository deploys the "latest" Docker image to Docker Hub on the creation of new Release/Tags. It is available at: https://hub.docker.com/r/weaponsforge/gemini-cli
39+
- Use this step to skip building the image locally at **step # 4**.
40+
- Pull the pre-built development Docker image:
41+
`docker pull weaponsforge/gemini-cli`
42+
3343
## 📖 Usage
3444

3545
1. Run the container.

0 commit comments

Comments
 (0)