From 047583683f6007783dd1241a4e5708acd2a1d0ce Mon Sep 17 00:00:00 2001 From: Jumpei Matsuda Date: Sun, 4 Feb 2024 23:55:35 +0900 Subject: [PATCH 1/2] ci: Run integration tests if secrets are found --- .github/workflows/integration-test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 420faac..422a270 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -4,6 +4,8 @@ on: workflow_dispatch: inputs: + pull_request: + push: branches: - main @@ -13,6 +15,8 @@ env: jobs: deploygate: + if: > + ${{ secrets.DEPLOYGATE_APP_OWNER_NAME }} timeout-minutes: 5 runs-on: ubuntu-latest steps: @@ -28,6 +32,8 @@ jobs: --api-token "${{ secrets.DEPLOYGATE_API_TOKEN }}" firebase-app-distribution: + if: > + ${{ secrets.FIREBASE_APP_ID }} timeout-minutes: 5 runs-on: ubuntu-latest steps: From 15dc2ef46c8a728d4e64d7406bec1ed1cb559bfb Mon Sep 17 00:00:00 2001 From: Jumpei Matsuda Date: Mon, 5 Feb 2024 00:00:35 +0900 Subject: [PATCH 2/2] fix-ci: Don't use secrets but actor matching --- .github/workflows/integration-test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 422a270..feedcf8 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -16,7 +16,8 @@ env: jobs: deploygate: if: > - ${{ secrets.DEPLOYGATE_APP_OWNER_NAME }} + github.event_name != 'pull_request' || + contains(fromJSON('["jmatsu", "dependabot[bot]"]'), github.actor) timeout-minutes: 5 runs-on: ubuntu-latest steps: @@ -33,7 +34,8 @@ jobs: firebase-app-distribution: if: > - ${{ secrets.FIREBASE_APP_ID }} + github.event_name != 'pull_request' || + contains(fromJSON('["jmatsu", "dependabot[bot]"]'), github.actor) timeout-minutes: 5 runs-on: ubuntu-latest steps: