From 06123776658f4e9464cef207df3065f5a9fe16bb Mon Sep 17 00:00:00 2001 From: Michal Dorner Date: Sun, 24 May 2020 21:17:51 +0200 Subject: [PATCH] Do not require user provided `githubToken` input (configure default) (#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. --- .github/workflows/pull-request-verification.yml | 1 - README.md | 4 +--- action.yml | 1 + 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull-request-verification.yml b/.github/workflows/pull-request-verification.yml index cc685d1..40637a0 100644 --- a/.github/workflows/pull-request-verification.yml +++ b/.github/workflows/pull-request-verification.yml @@ -23,7 +23,6 @@ jobs: - uses: ./ id: filter with: - githubToken: ${{ github.token }} filters: | src: - src/**/* diff --git a/README.md b/README.md index f1bc941..5bcdd10 100644 --- a/README.md +++ b/README.md @@ -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 @@ -42,7 +42,6 @@ on: pull_request: types: - opened - - edited - synchronize branches: - master @@ -54,7 +53,6 @@ jobs: - uses: dorny/pr-changed-files-filter@v1 id: filter with: - githubToken: ${{ github.token }} filters: | backend: - 'backend/**/*' diff --git a/action.yml b/action.yml index f54dac1..1250a10 100644 --- a/action.yml +++ b/action.yml @@ -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