Skip to content

Commit

Permalink
Do not require user provided githubToken input (configure default) …
Browse files Browse the repository at this point in the history
…(#7)

* Do not require user provided `githubToken` input  (configure default)

* Remove `edited` from workflow example

Idea of this example was to show setup where CI runs only when particular files are changed. Triggering workflow when name or description of PR is edited is not needed for this use case.
  • Loading branch information
Michal Dorner authored and GitHub committed May 24, 2020
1 parent 0c9e16c commit 0612377
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion .github/workflows/pull-request-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
- uses: ./
id: filter
with:
githubToken: ${{ github.token }}
filters: |
src:
- src/**/*
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ 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
- **`githubToken`**: GitHub Access Token - use `${{ github.token }}`
- **`githubToken`**: GitHub Access Token - defaults to `${{ github.token }}`
- **`filters`**: YAML dictionary where keys specifies rule names and values are lists of file path patterns

### Outputs
Expand All @@ -42,7 +42,6 @@ on:
pull_request:
types:
- opened
- edited
- synchronize
branches:
- master
Expand All @@ -54,7 +53,6 @@ jobs:
- uses: dorny/pr-changed-files-filter@v1
id: filter
with:
githubToken: ${{ github.token }}
filters: |
backend:
- 'backend/**/*'
Expand Down
1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ inputs:
githubToken:
description: 'GitHub Access Token'
required: true
default: ${{ github.token }}
filters:
description: 'YAML dictionary where keys specifies rule names and values are lists of (globbing) file path patterns'
required: true
Expand Down

0 comments on commit 0612377

Please sign in to comment.