commit 003c66e0936d8d86a9efc71c577531e4938a29e8
parent 7d725ebd4cc25a6f405242a90551a4c0b56dc56a
Author: Asher Morgan <asher@ashermorgan.net>
Date: Sun, 13 Sep 2026 14:59:58 -0700
Push Docker image to ghcr.io
Diffstat:
2 files changed, 55 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
@@ -0,0 +1,53 @@
+# See https://docs.github.com/en/actions/tutorials/publish-packages/publish-docker-images#publishing-images-to-github-packages
+name: Build Docker image
+
+on:
+ push:
+ branches: master
+
+env:
+ REGISTRY: ghcr.io
+ IMAGE_NAME: ${{ github.repository }}
+
+jobs:
+ build-and-push-image:
+ runs-on: ubuntu-latest
+
+ permissions:
+ contents: read
+ packages: write
+ attestations: write
+ id-token: write
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v6
+
+ - name: Log in to the Container registry
+ uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
+ with:
+ registry: ${{ env.REGISTRY }}
+ username: ${{ github.actor }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Extract metadata (tags, labels) for Docker
+ id: meta
+ uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
+ with:
+ images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
+
+ - name: Build and push Docker image
+ id: push
+ uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
+ with:
+ context: .
+ push: true
+ tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
+
+ - name: Generate artifact attestation
+ uses: actions/attest@v4
+ with:
+ subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
+ subject-digest: ${{ steps.push.outputs.digest }}
+ push-to-registry: true
diff --git a/README.md b/README.md
@@ -28,11 +28,10 @@ Note that Ansible controllers don't support Windows, so the `ansible-playbook`,
## Getting Started
-First, build and run the AoH server docker image.
+First, run the AoH server docker image.
```
-$ docker build -t aoh .
-$ docker run --rm --detach --name aoh -p 8000:8000 aoh
+$ docker run --rm --detach --name aoh -p 8000:8000 ghcr.io/ashermorgan/aoh
```
Next, run the [demo playbook](demo/my-playbook.yml) via the client Python