diff --git a/.github/workflows/pr_check.yml b/.github/workflows/pr_check.yml index ac420da..8b4c961 100644 --- a/.github/workflows/pr_check.yml +++ b/.github/workflows/pr_check.yml @@ -23,12 +23,14 @@ jobs: - name: Connect private iap package uses: webfactory/ssh-agent@v0.8.0 - if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} + id: fetch-iap + if: github.event.pull_request.head.repo.full_name == github.repository with: ssh-private-key: ${{ secrets.M3_LIGHTMETER_IAP_KEY }} - name: Override iap package with stub - if: ${{ github.event.pull_request.head.repo.full_name != github.repository }} + id: override-iap + if: steps.fetch-iap.conclusion != 'success' run: bash ./.github/scripts/stub_iap.sh - uses: subosito/flutter-action@v2 @@ -49,8 +51,8 @@ jobs: run: flutter test - name: Analyze project source with stub - if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} + if: steps.override-iap.conclusion != 'success' run: | bash ./.github/scripts/stub_iap.sh flutter pub get - flutter analyze lib --fatal-infos + flutter analyze lib --fatal-infos \ No newline at end of file