From 23257d6a4eff6b8cd0d6921bcd2a4de98121dc58 Mon Sep 17 00:00:00 2001 From: Aakash Hemadri Date: Thu, 28 Apr 2022 14:21:01 +0530 Subject: [PATCH 1/2] refactor: use flutter analyze as linter Signed-off-by: Aakash Hemadri --- .github/workflows/linter.yml | 39 +++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 3c5b4e0..5b9c248 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -7,18 +7,17 @@ name: Linter # on: - pull_request: + push: + branches: + - master + tags: + - v* + pull_request_target: branches: [master, main] - workflow_dispatch: - inputs: - vac: - description: 'set VALIDATE_ALL_CODEBASE' - required: false - default: 'false' - + jobs: linter: - name: Lint Code Base + name: Lint Code Base runs-on: ubuntu-latest steps: @@ -27,13 +26,17 @@ jobs: with: fetch-depth: 0 - - name: Lint Code Base - uses: github/super-linter/slim@v4 - env: - VALIDATE_ALL_CODEBASE: false - DEFAULT_BRANCH: master - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: '2.10.3' + channel: 'stable' + cache: true + cache-key: flutter + cache-path: ${{ runner.tool_cache }}/flutter + + - name: Disable analytics + run: flutter config --no-analytics - LINTER_RULES_PATH: /.github/linters - VALIDATE_JSCPD: false - VALIDATE_GITHUB_ACTIONS: false + - name: Flutter Analyze + run: flutter analyze --fatal-infos --fatal-warnings \ No newline at end of file From f548014f06ee0f76d96b0f2c19af17b4871a98f5 Mon Sep 17 00:00:00 2001 From: Aakash Hemadri Date: Thu, 28 Apr 2022 15:33:00 +0530 Subject: [PATCH 2/2] refactor: replace pull_request target Signed-off-by: Aakash Hemadri --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 1e9fb26..f8cb1e6 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -2,7 +2,7 @@ name: Pull Request - CI on: - pull_request: + pull_request_target: paths-ignore: - '**.md' - 'app/src/main/res/**/strings.xml'