From e81d1a76868b29a843f750f0c6f3e79f6794bc7d Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Sat, 1 Jun 2024 06:14:00 -0400 Subject: [PATCH] avoid running publish workflows on forked branches --- .github/workflows/lock-threads.yml | 4 ++-- .github/workflows/publish_image.yml | 2 ++ .github/workflows/python-publish.yml | 2 ++ .github/workflows/upload_chart.yml | 2 ++ CHANGELOG.md | 1 + 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lock-threads.yml b/.github/workflows/lock-threads.yml index 2d6c9e40..83c24f1f 100644 --- a/.github/workflows/lock-threads.yml +++ b/.github/workflows/lock-threads.yml @@ -22,5 +22,5 @@ jobs: with: include-discussion-currently-open: true discussion-inactive-days: 90 - issue-inactive-days: 30 - pr-inactive-days: 30 + issue-inactive-days: 365 + pr-inactive-days: 365 diff --git a/.github/workflows/publish_image.yml b/.github/workflows/publish_image.yml index 7911d875..9cbe7943 100644 --- a/.github/workflows/publish_image.yml +++ b/.github/workflows/publish_image.yml @@ -15,6 +15,8 @@ env: jobs: push: + if: github.repository_owner == 'jertel' + environment: Main runs-on: ubuntu-latest diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index e38a813f..1a25e0aa 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -10,6 +10,8 @@ on: jobs: deploy: + if: github.repository_owner == 'jertel' + environment: Main runs-on: ubuntu-latest diff --git a/.github/workflows/upload_chart.yml b/.github/workflows/upload_chart.yml index e12a4b9f..6051a87a 100644 --- a/.github/workflows/upload_chart.yml +++ b/.github/workflows/upload_chart.yml @@ -7,6 +7,8 @@ on: jobs: publish: + if: github.repository_owner == 'jertel' + environment: Main runs-on: ubuntu-latest steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index a4418f19..983db0f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ## Other changes - [Docs] Fixed typo in Alerta docs with incorrect number of seconds in a day. - @jertel +- Update GitHub actions to avoid running publish workflows on forked branches. - @jertel # 2.18.0