Skip to content

Commit f1eb574

Browse files
Andrewclaude
andcommitted
Add GitHub Actions CI and switch to ghcr.io image
Builds and pushes to ghcr.io on every push to main. Compose now pulls the published image instead of building locally, so Watchtower can auto-update the container. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 01e59d6 commit f1eb574

2 files changed

Lines changed: 34 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
env:
8+
REGISTRY: ghcr.io
9+
IMAGE_NAME: ${{ github.repository }}
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: docker/login-action@v3
22+
with:
23+
registry: ${{ env.REGISTRY }}
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- uses: docker/build-push-action@v6
28+
with:
29+
context: .
30+
push: true
31+
tags: |
32+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
33+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
secretlair:
3-
build: .
3+
image: ghcr.io/epiphanyplx/secret-lair-monitor:latest
44
container_name: secretlair
55
restart: unless-stopped
66
env_file: .env

0 commit comments

Comments
 (0)