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 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