mirror of
https://gitea.com/actions/dorny-paths-filter.git
synced 2024-11-23 18:23:41 +08:00
Rename github-token
input to githubToken
This commit is contained in:
parent
f29479bb44
commit
350b8cb78b
@ -21,8 +21,8 @@ Corresponding output variable will be created to indicate if there's a changed f
|
||||
Output variables can be later used in the `if` clause to conditionally run specific steps.
|
||||
|
||||
### Inputs
|
||||
- **`repo-token`**: GitHub Access Token - use `${{ github.token }}`
|
||||
- **`filters`**: YAML dictionary where keys specifies rule names and values are lists of path patterns
|
||||
- **`githubToken`**: GitHub Access Token - use `${{ github.token }}`
|
||||
- **`filters`**: YAML dictionary where keys specifies rule names and values are lists of file path patterns
|
||||
|
||||
### Outputs
|
||||
- For each rule it sets output variable named by the rule to text:
|
||||
@ -51,7 +51,7 @@ jobs:
|
||||
- uses: dorny/pr-changed-files-filter@v1
|
||||
id: filter
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
githubToken: ${{ github.token }}
|
||||
filters: |
|
||||
backend:
|
||||
- 'backend/**/*'
|
||||
@ -76,7 +76,7 @@ jobs:
|
||||
|
||||
## How it works
|
||||
|
||||
1. Required inputs are checked (`github-token` & `filters`)
|
||||
1. Required inputs are checked (`githubToken` & `filters`)
|
||||
2. Provided access token is used to fetch list of changed files.
|
||||
3. For each filter rule it checks if there is any matching file
|
||||
4. Output variables are set
|
||||
|
@ -2,7 +2,7 @@ name: 'Pull request changed files filter'
|
||||
description: 'Enables conditional execution of workflow job steps considering which files are modified by a pull request.'
|
||||
author: 'Michal Dorner <dorner.michal@gmail.com>'
|
||||
inputs:
|
||||
github-token:
|
||||
githubToken:
|
||||
description: 'GitHub Access Token - use ${{ github.token }}'
|
||||
required: true
|
||||
filters:
|
||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -4117,7 +4117,7 @@ const filter_1 = __importDefault(__webpack_require__(235));
|
||||
function run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
const token = core.getInput('github-token', { required: true });
|
||||
const token = core.getInput('githubToken', { required: true });
|
||||
const filterYaml = core.getInput('filter', { required: true });
|
||||
const client = new github.GitHub(token);
|
||||
if (github.context.eventName !== 'pull_request') {
|
||||
|
@ -6,7 +6,7 @@ import Filter from './filter'
|
||||
|
||||
async function run(): Promise<void> {
|
||||
try {
|
||||
const token = core.getInput('github-token', {required: true})
|
||||
const token = core.getInput('githubToken', {required: true})
|
||||
const filterYaml = core.getInput('filter', {required: true})
|
||||
const client = new github.GitHub(token)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user