Skip to content

Commit 3da2010

Browse files
committed
fix: reuse zulip workflow
1 parent 0dbda2e commit 3da2010

File tree

3 files changed

+17
-41
lines changed

3 files changed

+17
-41
lines changed

.github/workflows/release-1-branch.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,13 @@ jobs:
6161
6262
6363
on-failure:
64-
runs-on: ubuntu-22.04
64+
needs:
65+
- create-branch
6566
if: |
6667
failure() &&
6768
(needs.create-branch.result == 'failure' || needs.create-branch.result == 'timed_out')
68-
needs:
69-
- create-branch
70-
steps:
71-
72-
- name: Send a stream message
73-
uses: zulip/github-actions-zulip/send-message@v1
74-
with:
75-
api-key: ${{ secrets.ZULIP_API_KEY_GITHUB_ACTIONS_BOT }}
76-
77-
organization-url: "https://chat.kobotoolbox.org"
78-
type: "stream"
79-
to: "Kobo Dev"
80-
topic: "Github Actions (CD)"
81-
content: ":warning: [run #${{github.run_number}}](${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}) release candidate creation failed."
69+
uses: './.github/workflows/zulip.yml'
70+
secrets: inherit
71+
with:
72+
topic: "Github Actions (CD)"
73+
content: ":warning: [run #${{github.run_number}}](${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}) release candidate creation failed."

.github/workflows/release-3-tag.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ jobs:
9898
9999
100100
on-failure:
101-
runs-on: ubuntu-22.04
102101
needs:
103102
- darker
104103
- pytest
@@ -112,15 +111,8 @@ jobs:
112111
needs.npm-test.result == 'failure' || needs.npm-test.result == 'timed_out' ||
113112
needs.deploy-to-master.result == 'failure' || needs.deploy-to-master.result == 'timed_out' ||
114113
needs.bump.result == 'failure' || needs.bump.result == 'timed_out')
115-
steps:
116-
117-
- name: Send a stream message
118-
uses: zulip/github-actions-zulip/send-message@v1
119-
with:
120-
api-key: ${{ secrets.ZULIP_API_KEY_GITHUB_ACTIONS_BOT }}
121-
122-
organization-url: "https://chat.kobotoolbox.org"
123-
type: "stream"
124-
to: "Kobo Dev"
125-
topic: "Github Actions (CD)"
126-
content: ":warning: [run #${{github.run_number}}](${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}) release candidate tagging failed."
114+
uses: './.github/workflows/zulip.yml'
115+
secrets: inherit
116+
with:
117+
topic: "Github Actions (CD)"
118+
content: ":warning: [run #${{github.run_number}}](${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}) release candidate tagging failed."

.github/workflows/release-4-announce.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ jobs:
5353
5454
5555
on-failure:
56-
runs-on: ubuntu-22.04
5756
needs:
5857
- changelog
5958
- kpi
@@ -65,15 +64,8 @@ jobs:
6564
needs.kpi.result == 'failure' || needs.kpi.result == 'timed_out' ||
6665
needs.kobo-docker.result == 'failure' || needs.kobo-docker.result == 'timed_out' ||
6766
needs.kobo-install.result == 'failure' || needs.kobo-install.result == 'timed_out')
68-
steps:
69-
70-
- name: Send a stream message
71-
uses: zulip/github-actions-zulip/send-message@v1
72-
with:
73-
api-key: ${{ secrets.ZULIP_API_KEY_GITHUB_ACTIONS_BOT }}
74-
75-
organization-url: "https://chat.kobotoolbox.org"
76-
type: "stream"
77-
to: "Kobo Dev"
78-
topic: "Github Actions (${{ github.event.inputs.prod_env }})"
79-
content: ":warning: ${{ github.event.inputs.tag }} failed to create a Github release(s), see [run #${{github.run_number}}](${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}})."
67+
uses: './.github/workflows/zulip.yml'
68+
secrets: inherit
69+
with:
70+
topic: "Github Actions (${{ github.event.inputs.prod_env }})"
71+
content: ":warning: ${{ github.event.inputs.tag }} failed to create a Github release(s), see [run #${{github.run_number}}](${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}})."

0 commit comments

Comments
 (0)