diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index 005fc6b..482c326 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -36,8 +36,6 @@ jobs: run: git checkout patch_change - name: Run the action uses: ./action/ - env: - GITHUB_TOKEN: ${{ github.token }} # Assumes that the latest published normal version of `ref_slice` smaller # than 1.2.2 exports a public function `ref_slice`. # TODO: Change the crate version in the corresponding branch `major_change` @@ -49,8 +47,6 @@ jobs: - name: Run the action (allowed to fail) id: action_major uses: ./action/ - env: - GITHUB_TOKEN: ${{ github.token }} continue-on-error: true - name: Fail if the action has not returned any errors (but it should have) if: steps.action_major.outcome != 'failure' diff --git a/README.md b/README.md index 1a127d7..4cd1ea7 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ Every argument is optional. | Input | Description | Default | |--------------------|-----------------------------------------------------------------------------------------------------------------------------------|---------| -| package | The package whose API to check for semver (in Package Id Specification format, see https://doc.rust-lang.org/cargo/reference/pkgid-spec.html for reference). If not set, all packages in the workspace are processed. | | +| github-token | The `GITHUB_TOKEN` secret, which is necessary to download precompiled binaries from GitHub API. By default, the [automatic GitHub token](https://docs.github.com/en/actions/security-guides/automatic-token-authentication) provided to the workflow will be used. The token may be alternatively passed in an environment variable `GITHUB_TOKEN`. | | +| package | The package whose API to check for semver (in Package Id Specification format, see https://doc.rust-lang.org/cargo/reference/pkgid-spec.html for reference). If not set, all packages in the workspace are processed. | | | manifest-path | Path to Cargo.toml of crate or workspace to check. Has an effect only if `package` is not specified. | | | verbose | Enables verbose output of `cargo-semver-checks`. | `false` | diff --git a/action.yml b/action.yml index 86097d4..9c8da45 100644 --- a/action.yml +++ b/action.yml @@ -4,6 +4,10 @@ branding: icon: 'check-circle' color: 'green' inputs: + github-token: + description: 'The GITHUB_TOKEN secret, which is necessary to download precompiled binaries from GitHub API. By default, the automatic GitHub token provided to the workflow will be used.' + required: false + default: ${{ github.token }} package: description: 'The package whose API to check for semver (in Package Id Specification format, see https://doc.rust-lang.org/cargo/reference/pkgid-spec.html for reference). If not set, all packages in the workspace are processed.' required: false