From 8a996bdd5f65eeed046acf2d3f02b991894a36c2 Mon Sep 17 00:00:00 2001 From: Michal Zgliczynski Date: Wed, 20 Nov 2024 11:59:20 +0100 Subject: [PATCH 1/3] JS-417 Add releasability check --- .github/workflows/releasability.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/releasability.yml diff --git a/.github/workflows/releasability.yml b/.github/workflows/releasability.yml new file mode 100644 index 00000000000..41acc9daabd --- /dev/null +++ b/.github/workflows/releasability.yml @@ -0,0 +1,27 @@ +name: Releasability status +'on': + check_suite: + types: + - completed +jobs: + update_releasability_status: + runs-on: ubuntu-latest + name: Releasability status + permissions: + id-token: write + statuses: write + contents: read + if: >- + (contains(fromJSON('["main", "master", "js-417"]'), + github.event.check_suite.head_branch) || + startsWith(github.event.check_suite.head_branch, 'dogfood-') || + startsWith(github.event.check_suite.head_branch, 'branch-')) && + github.event.check_suite.conclusion == 'success' && + github.event.check_suite.app.slug == 'cirrus-ci' + steps: + - uses: >- + SonarSource/gh-action_releasability/releasability-status@v2 + with: + optional_checks: "Jira" + env: + GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' From 62808f11f322d40336d831afa3a593204710dc86 Mon Sep 17 00:00:00 2001 From: Michal Zgliczynski Date: Wed, 20 Nov 2024 14:09:36 +0100 Subject: [PATCH 2/3] remove conditions and verify it runs on push of this branch --- .github/workflows/releasability.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/releasability.yml b/.github/workflows/releasability.yml index 41acc9daabd..e7e2d4c6042 100644 --- a/.github/workflows/releasability.yml +++ b/.github/workflows/releasability.yml @@ -1,8 +1,8 @@ name: Releasability status 'on': - check_suite: - types: - - completed + push: + branches: + - js-417 jobs: update_releasability_status: runs-on: ubuntu-latest @@ -11,13 +11,6 @@ jobs: id-token: write statuses: write contents: read - if: >- - (contains(fromJSON('["main", "master", "js-417"]'), - github.event.check_suite.head_branch) || - startsWith(github.event.check_suite.head_branch, 'dogfood-') || - startsWith(github.event.check_suite.head_branch, 'branch-')) && - github.event.check_suite.conclusion == 'success' && - github.event.check_suite.app.slug == 'cirrus-ci' steps: - uses: >- SonarSource/gh-action_releasability/releasability-status@v2 From 6b0ade1b0ab544ae17ed473c85c70559aa1f3c0e Mon Sep 17 00:00:00 2001 From: Michal Zgliczynski Date: Wed, 20 Nov 2024 14:12:51 +0100 Subject: [PATCH 3/3] update --- .github/workflows/releasability.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/releasability.yml b/.github/workflows/releasability.yml index e7e2d4c6042..5b0effacd58 100644 --- a/.github/workflows/releasability.yml +++ b/.github/workflows/releasability.yml @@ -1,8 +1,8 @@ name: Releasability status 'on': - push: - branches: - - js-417 + check_suite: + types: + - completed jobs: update_releasability_status: runs-on: ubuntu-latest @@ -11,6 +11,13 @@ jobs: id-token: write statuses: write contents: read + if: >- + (contains(fromJSON('["main", "master"]'), + github.event.check_suite.head_branch) || + startsWith(github.event.check_suite.head_branch, 'dogfood-') || + startsWith(github.event.check_suite.head_branch, 'branch-')) && + github.event.check_suite.conclusion == 'success' && + github.event.check_suite.app.slug == 'cirrus-ci' steps: - uses: >- SonarSource/gh-action_releasability/releasability-status@v2