Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ jobs:
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.short-sha.outputs.sha }}
labels: ${{ steps.meta.outputs.labels }}
# - name: Generate artifact attestation
# uses: actions/attest-build-provenance@v2
# with:
# subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# subject-digest: ${{ steps.push.outputs.digest }}
# push-to-registry: true
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v2
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: false
29 changes: 23 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,31 @@ You can also utilise the Docker image without installing the binary executable f
Simply enter the subsequent command or reference the `compose.yaml` file.

```bash
docker run --rm ghcr.io/mingcheng/aigitcommit:latest \
-v .:\repo:ro \
-e OPENAI_API_BASE='<openai api base>' \
-e OPENAI_API_TOKEN='<token>' \
-e OPENAI_MODEL_NAME='<model name>'
docker run \
--rm \
-v $PWD:/repo:ro \
-e OPENAI_API_BASE='<api base>' \
-e OPENAI_API_TOKEN='<api token>' \
-e OPENAI_MODEL_NAME='<model name>' \
-e OPENAI_API_PROXY='<the proxy address if you need>' \
ghcr.io/mingcheng/aigitcommit
```

Notice: If you wish to utilise the `--commit` option, you must ensure that the `/repo` directory is writable.
Notice: If you wish to utilise the `--commit` option, you must ensure that the `/repo` directory is writable:

```bash
docker run \
--rm \
-it \
-v $PWD:/repo:rw \
-e OPENAI_API_BASE='<api base>' \
-e OPENAI_API_TOKEN='<api token>' \
-e OPENAI_MODEL_NAME='<model name>' \
-e OPENAI_API_PROXY='<the proxy address if you need>' \
ghcr.io/mingcheng/aigitcommit --commit
```

Tips: You can add `--yes` options to skip the confirm.

### Git Hook

Expand Down