-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ci): do not run workflows tied to
ZcashFoundation
infra in…
… forks (#9257) * Fix GitHub workflows There are two workflows that have bugs in them: - cd-deploy-nodes-gcp is missing a job name, which is then depended-on later - sub-ci-integration-tests-gcp changed the name of a job without changing its dependents * Stop certain CI jobs from running on forks There are various GitHub CI jobs that won’t work on forks. E.g., some need credentials for ZF’s DockerHub or GCP accounts. Unfortunately, you can’t prevent entire workflows from running this way, but this disables a minimal number of jobs to keep forks from failing whenever `main` is pushed to.
- Loading branch information
Showing
7 changed files
with
16 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -227,12 +227,9 @@ jobs: | |
# - on every push to the `main` branch | ||
# - on every release, when it's published | ||
# - on workflow_dispatch for manual deployments | ||
|
||
# Determine which networks to deploy based on the trigger | ||
|
||
|
||
|
||
: | ||
set-matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
networks: ${{ steps.set-networks.outputs.matrix }} | ||
|
@@ -268,7 +265,7 @@ jobs: | |
permissions: | ||
contents: "read" | ||
id-token: "write" | ||
if: ${{ !cancelled() && !failure() && ((github.event_name == 'push' && github.ref_name == 'main') || github.event_name == 'release' || github.event_name == 'workflow_dispatch') }} | ||
if: ${{ !cancelled() && !failure() && github.repository_owner == 'ZcashFoundation' && ((github.event_name == 'push' && github.ref_name == 'main') || github.event_name == 'release' || github.event_name == 'workflow_dispatch') }} | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,6 +105,7 @@ jobs: | |
# Setup gcloud CLI | ||
- name: Authenticate to Google Cloud | ||
if: github.repository_owner == 'ZcashFoundation' | ||
id: auth | ||
uses: google-github-actions/[email protected] | ||
with: | ||
|
@@ -114,11 +115,13 @@ jobs: | |
# TODO: remove this step after issue https://github.com/FirebaseExtended/action-hosting-deploy/issues/174 is fixed | ||
|
||
- name: Add $GCP_FIREBASE_SA_PATH to env | ||
if: github.repository_owner == 'ZcashFoundation' | ||
run: | | ||
# shellcheck disable=SC2002 | ||
echo "GCP_FIREBASE_SA_PATH=$(cat ${{ steps.auth.outputs.credentials_file_path }} | tr -d '\n')" >> "$GITHUB_ENV" | ||
- name: Deploy Zebra book to firebase | ||
if: github.repository_owner == 'ZcashFoundation' | ||
uses: FirebaseExtended/[email protected] | ||
with: | ||
firebaseServiceAccount: ${{ env.GCP_FIREBASE_SA_PATH }} | ||
|
@@ -163,6 +166,7 @@ jobs: | |
# Setup gcloud CLI | ||
- name: Authenticate to Google Cloud | ||
if: github.repository_owner == 'ZcashFoundation' | ||
id: auth | ||
uses: google-github-actions/[email protected] | ||
with: | ||
|
@@ -171,11 +175,13 @@ jobs: | |
|
||
# TODO: remove this step after issue https://github.com/FirebaseExtended/action-hosting-deploy/issues/174 is fixed | ||
- name: Add $GCP_FIREBASE_SA_PATH to env | ||
if: github.repository_owner == 'ZcashFoundation' | ||
run: | | ||
# shellcheck disable=SC2002 | ||
echo "GCP_FIREBASE_SA_PATH=$(cat ${{ steps.auth.outputs.credentials_file_path }} | tr -d '\n')" >> "$GITHUB_ENV" | ||
- name: Deploy internal docs to firebase | ||
if: github.repository_owner == 'ZcashFoundation' | ||
uses: FirebaseExtended/[email protected] | ||
with: | ||
firebaseServiceAccount: ${{ env.GCP_FIREBASE_SA_PATH }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ on: | |
|
||
jobs: | ||
dockerHubDescription: | ||
if: github.repository_owner == 'ZcashFoundation' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters