Add github-token input (#13)

This commit is contained in:
Mieszko Grodzicki 2023-02-23 18:30:44 +01:00 committed by Predrag Gruevski
parent b4b317a6f3
commit 9d38089c3c
3 changed files with 6 additions and 5 deletions

View file

@ -36,8 +36,6 @@ jobs:
run: git checkout patch_change run: git checkout patch_change
- name: Run the action - name: Run the action
uses: ./action/ uses: ./action/
env:
GITHUB_TOKEN: ${{ github.token }}
# Assumes that the latest published normal version of `ref_slice` smaller # Assumes that the latest published normal version of `ref_slice` smaller
# than 1.2.2 exports a public function `ref_slice`. # than 1.2.2 exports a public function `ref_slice`.
# TODO: Change the crate version in the corresponding branch `major_change` # TODO: Change the crate version in the corresponding branch `major_change`
@ -49,8 +47,6 @@ jobs:
- name: Run the action (allowed to fail) - name: Run the action (allowed to fail)
id: action_major id: action_major
uses: ./action/ uses: ./action/
env:
GITHUB_TOKEN: ${{ github.token }}
continue-on-error: true continue-on-error: true
- name: Fail if the action has not returned any errors (but it should have) - name: Fail if the action has not returned any errors (but it should have)
if: steps.action_major.outcome != 'failure' if: steps.action_major.outcome != 'failure'

View file

@ -14,6 +14,7 @@ Every argument is optional.
| Input | Description | Default | | Input | Description | Default |
|--------------------|-----------------------------------------------------------------------------------------------------------------------------------|---------| |--------------------|-----------------------------------------------------------------------------------------------------------------------------------|---------|
| 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. | | | 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. | | | 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` | | verbose | Enables verbose output of `cargo-semver-checks`. | `false` |

View file

@ -4,6 +4,10 @@ branding:
icon: 'check-circle' icon: 'check-circle'
color: 'green' color: 'green'
inputs: 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: 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.' 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 required: false