From d99f83ecccf8088c8590c5291846cbfe3006f867 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Tue, 22 Apr 2025 17:58:00 -0400 Subject: [PATCH 1/5] [Infra] Update shared spm infra to trigger on workflow dispatches --- .github/workflows/common.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 7709db0e71a..0bf944342cd 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -56,8 +56,9 @@ jobs: key: ${{ steps.generate_cache_key.outputs.cache_key }} spm: - # Don't run on private repo unless it is a PR. - if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request' + if: | + (github.repository == 'firebase/firebase-ios-sdk' && github.event_name == 'schedule') || \ + contains(['pull_request', 'workflow_dispatch'], github.event_name) needs: [spm-package-resolved] strategy: matrix: From bc2e5f85761ed1b32d43aba7298e863a45141641 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Wed, 23 Apr 2025 10:29:29 -0400 Subject: [PATCH 2/5] Update common.yml --- .github/workflows/common.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 0bf944342cd..a8b0eed98dd 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -56,9 +56,8 @@ jobs: key: ${{ steps.generate_cache_key.outputs.cache_key }} spm: - if: | - (github.repository == 'firebase/firebase-ios-sdk' && github.event_name == 'schedule') || \ - contains(['pull_request', 'workflow_dispatch'], github.event_name) + # Run on the main repo's scheduled jobs or pull requests and manual workflow invocations. + if: (github.repository == 'firebase/firebase-ios-sdk' && github.event_name == 'schedule') || contains(['pull_request', 'workflow_dispatch'], github.event_name) needs: [spm-package-resolved] strategy: matrix: From 319726cdd6bad922b3aae3d453cc09a48683a575 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Wed, 23 Apr 2025 10:33:23 -0400 Subject: [PATCH 3/5] Update common.yml --- .github/workflows/common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index a8b0eed98dd..00b26574618 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -57,7 +57,7 @@ jobs: spm: # Run on the main repo's scheduled jobs or pull requests and manual workflow invocations. - if: (github.repository == 'firebase/firebase-ios-sdk' && github.event_name == 'schedule') || contains(['pull_request', 'workflow_dispatch'], github.event_name) + if: (github.repository == 'firebase/firebase-ios-sdk' && github.event_name == 'schedule') || contains(fromJSON('["pull_request", "workflow_dispatch"]'), github.event_name) needs: [spm-package-resolved] strategy: matrix: From 7d25e811a5657c998740084b971579668d067249 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Wed, 23 Apr 2025 11:17:11 -0400 Subject: [PATCH 4/5] Address warning --- .github/workflows/common.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 00b26574618..b3a7871970b 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -1,5 +1,8 @@ name: common +permissions: + contents: read + on: workflow_call: inputs: From 5b2e8423bc63a9c0c1da5bedff84ebc00895c077 Mon Sep 17 00:00:00 2001 From: Nick Cooke <36927374+ncooke3@users.noreply.github.com> Date: Wed, 23 Apr 2025 11:19:08 -0400 Subject: [PATCH 5/5] Update common.yml --- .github/workflows/common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index b3a7871970b..2bd85247a7d 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -2,7 +2,7 @@ name: common permissions: contents: read - + on: workflow_call: inputs: