diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index da7d7c0..9118193 100644 --- a/.github/workflows/post-release.yml +++ b/.github/workflows/post-release.yml @@ -83,9 +83,9 @@ jobs: exit 1 fi - sed -E -i "s|(uses: dceoy/opencode-action@)[0-9a-f]{40}( +#.*)?|\1${release_sha} # ${RELEASE_TAG}|" README.md - sed -E -i "s|(uses: actions/checkout@)[0-9a-f]{40}( +#.*)?|\1${CHECKOUT_SHA} # ${CHECKOUT_TAG}|" README.md - sed -E -i "s#(uses: dceoy/opencode-action/\.github/workflows/opencode-(bot|review)\.yml@)[0-9a-f]{40}#\1${release_sha}#g" docs/reusable-workflows.md + sed -E -i "s|(uses: dceoy/opencode-action@)[0-9a-f]{40}( +#.*)?|\1${release_sha} # ${RELEASE_TAG}|" README.md + sed -E -i "s|(uses: actions/checkout@)[0-9a-f]{40}( +#.*)?|\1${CHECKOUT_SHA} # ${CHECKOUT_TAG}|" README.md + sed -E -i "s#(uses: dceoy/opencode-action/\.github/workflows/opencode-(bot|review)\.yml@)[0-9a-f]{40}( +#.*)?#\1${release_sha} # ${RELEASE_TAG}#g" docs/reusable-workflows.md - name: Create pull request uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 with: diff --git a/README.md b/README.md index 4cb7cbc..f1cbd09 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ In **Settings → Secrets and variables → Actions**, add the API key for your Create `.github/workflows/opencode.yml`: + ```yaml --- name: OpenCode @@ -33,11 +34,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Run OpenCode - uses: dceoy/opencode-action@e5fa6280c65275a5cd7b2251d235f752849ab4d4 # v0.6.5 + uses: dceoy/opencode-action@e5fa6280c65275a5cd7b2251d235f752849ab4d4 # v0.6.5 env: OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} GITHUB_TOKEN: ${{ github.token }} diff --git a/docs/reusable-workflows.md b/docs/reusable-workflows.md index b50af84..75e6caf 100644 --- a/docs/reusable-workflows.md +++ b/docs/reusable-workflows.md @@ -8,6 +8,7 @@ The examples below pin the reusable workflow definition to a full commit SHA. In Use `opencode-bot.yml` for `/opencode` and `/oc` comments, or for another event with a fixed `prompt`. + ```yaml --- name: OpenCode @@ -25,7 +26,7 @@ jobs: pull-requests: write id-token: write actions: read - uses: dceoy/opencode-action/.github/workflows/opencode-bot.yml@de968892b27dd42727fa175cd00610a54d091bf9 + uses: dceoy/opencode-action/.github/workflows/opencode-bot.yml@e5fa6280c65275a5cd7b2251d235f752849ab4d4 # v0.6.5 with: model: opencode-go/kimi-k3 secrets: @@ -38,6 +39,7 @@ For comment events, the reusable workflow accepts comments only from `OWNER`, `M Use `opencode-review.yml` for automatic reviews on `pull_request` events. Its `prompt` defaults to `/review-pr`. + ```yaml --- name: OpenCode review @@ -53,7 +55,7 @@ jobs: pull-requests: write id-token: write actions: read - uses: dceoy/opencode-action/.github/workflows/opencode-review.yml@de968892b27dd42727fa175cd00610a54d091bf9 + uses: dceoy/opencode-action/.github/workflows/opencode-review.yml@e5fa6280c65275a5cd7b2251d235f752849ab4d4 # v0.6.5 with: model: openrouter/openrouter/free secrets: