From 7ed5507bc60fa83a6051130d8e6ad19b0a03f612 Mon Sep 17 00:00:00 2001 From: mingcheng Date: Wed, 5 Mar 2025 11:29:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20update=20artifact=20attestation=20in?= =?UTF-8?q?=20CI=20workflow=20=F0=9F=93=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change push-to-registry to false in `ghcr.yml` --- .github/workflows/ghcr.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.yml index 5a02186..e31db4a 100644 --- a/.github/workflows/ghcr.yml +++ b/.github/workflows/ghcr.yml @@ -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 From 38767ace6fe9587ace10f9a985f8ca7c17e78fb3 Mon Sep 17 00:00:00 2001 From: mingcheng Date: Wed, 5 Mar 2025 11:29:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20enhance=20Docker=20usage=20instruct?= =?UTF-8?q?ions=20in=20README=20=F0=9F=93=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Expand Docker instructions with additional options and environment variables - Add note about write access for --commit option - Include --yes option tip --- README.md | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b89c72c..59b93c8 100644 --- a/README.md +++ b/README.md @@ -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='' \ - -e OPENAI_API_TOKEN='' \ - -e OPENAI_MODEL_NAME='' +docker run \ + --rm \ + -v $PWD:/repo:ro \ + -e OPENAI_API_BASE='' \ + -e OPENAI_API_TOKEN='' \ + -e OPENAI_MODEL_NAME='' \ + -e OPENAI_API_PROXY='' \ + 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='' \ + -e OPENAI_API_TOKEN='' \ + -e OPENAI_MODEL_NAME='' \ + -e OPENAI_API_PROXY='' \ + ghcr.io/mingcheng/aigitcommit --commit +``` + +Tips: You can add `--yes` options to skip the confirm. ### Git Hook