From f6f448e0a3b570cf4ccd71891ef8892203e44ecf Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 2 Aug 2020 09:18:23 -0700 Subject: [PATCH 1/2] Disable workflows that would always fail from running in forks These workflows use resources that are only available when run in the arduino/arduino-cli repository, so would always fail when they run in a repository. They are of no value to fork repositories. They are triggered by the schedule event, so they cause regular annoying and confusing workflow failure notifications for every fork owner. --- .github/workflows/arduino-stats.yaml | 3 +++ .github/workflows/github-stats.yaml | 3 +++ .github/workflows/i18n-nightly-push.yaml | 3 +++ .github/workflows/i18n-weekly-pull.yaml | 3 +++ .github/workflows/nightly.yaml | 3 +++ 5 files changed, 15 insertions(+) diff --git a/.github/workflows/arduino-stats.yaml b/.github/workflows/arduino-stats.yaml index d7812a2b707..37c837e5335 100644 --- a/.github/workflows/arduino-stats.yaml +++ b/.github/workflows/arduino-stats.yaml @@ -7,6 +7,9 @@ on: jobs: push-stats: + # This workflow is only of value to the arduino/arduino-cli repository and + # would always fail in forks + if: github.repository == 'arduino/arduino-cli' runs-on: ubuntu-latest steps: diff --git a/.github/workflows/github-stats.yaml b/.github/workflows/github-stats.yaml index 011fef3aaa8..83ca534ce34 100644 --- a/.github/workflows/github-stats.yaml +++ b/.github/workflows/github-stats.yaml @@ -7,6 +7,9 @@ on: jobs: push-stats: + # This workflow is only of value to the arduino/arduino-cli repository and + # would always fail in forks + if: github.repository == 'arduino/arduino-cli' runs-on: ubuntu-latest steps: diff --git a/.github/workflows/i18n-nightly-push.yaml b/.github/workflows/i18n-nightly-push.yaml index 9908f574bd3..8ee5fe0ea0e 100644 --- a/.github/workflows/i18n-nightly-push.yaml +++ b/.github/workflows/i18n-nightly-push.yaml @@ -7,6 +7,9 @@ on: jobs: push-to-transifex: + # This workflow is only of value to the arduino/arduino-cli repository and + # would always fail in forks + if: github.repository == 'arduino/arduino-cli' runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/i18n-weekly-pull.yaml b/.github/workflows/i18n-weekly-pull.yaml index 3b9e46320de..d28dc59a5d0 100644 --- a/.github/workflows/i18n-weekly-pull.yaml +++ b/.github/workflows/i18n-weekly-pull.yaml @@ -7,6 +7,9 @@ on: jobs: pull-from-transifex: + # This workflow is only of value to the arduino/arduino-cli repository and + # would always fail in forks + if: github.repository == 'arduino/arduino-cli' runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 5bc38a5fe96..60296995f0b 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -7,6 +7,9 @@ on: jobs: create-nightly-artifacts: + # This workflow is only of value to the arduino/arduino-cli repository and + # would always fail in forks + if: github.repository == 'arduino/arduino-cli' runs-on: ubuntu-latest container: From 7424b0118566dbf66d4fc90edd6c1f752576d6a3 Mon Sep 17 00:00:00 2001 From: per1234 Date: Mon, 3 Aug 2020 13:29:29 -0700 Subject: [PATCH 2/2] Don't trigger link validation CI workflow on schedule event when in a fork --- .github/workflows/link-validation.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/link-validation.yaml b/.github/workflows/link-validation.yaml index f36037e68c2..9cc70234880 100644 --- a/.github/workflows/link-validation.yaml +++ b/.github/workflows/link-validation.yaml @@ -8,6 +8,8 @@ on: jobs: verify-links: + # Don't trigger on schedule event when in a fork + if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'arduino/arduino-cli') runs-on: ubuntu-latest steps: - uses: actions/checkout@v2