From 3b2b1218bb06571bad167dfa03379754faeb6efe Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 24 Apr 2025 14:15:21 -0700 Subject: [PATCH 1/2] Add OSBotify token for RN publish workflow --- .github/workflows/publishReactNativeAndroidArtifacts.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/publishReactNativeAndroidArtifacts.yml b/.github/workflows/publishReactNativeAndroidArtifacts.yml index 30c2f05ecd61..da22091fc6af 100644 --- a/.github/workflows/publishReactNativeAndroidArtifacts.yml +++ b/.github/workflows/publishReactNativeAndroidArtifacts.yml @@ -23,6 +23,7 @@ jobs: with: submodules: ${{ matrix.is_hybrid }} ref: ${{ github.event.before }} + token: ${{ secrets.OS_BOTIFY_TOKEN }} - name: Get previous App commit hash id: getOldAppHash @@ -137,3 +138,9 @@ jobs: IS_HYBRID_BUILD: ${{ matrix.is_hybrid }} PATCHED_VERSION: ${{ steps.getNewPatchedVersion.outputs.NEW_PATCHED_VERSION }} COMMIT_HASH: ${{ github.event.after }} + + - name: Announce failed workflow in Slack + if: ${{ failure() }} + uses: ./.github/actions/composite/announceFailedWorkflowInSlack + with: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} From f138f35b0f779ff7a5d79c1a73cbdd809d5edd30 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 24 Apr 2025 14:22:09 -0700 Subject: [PATCH 2/2] Post announcement in open source channel --- .../composite/announceFailedWorkflowInSlack/action.yml | 6 +++++- .github/workflows/publishReactNativeAndroidArtifacts.yml | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/composite/announceFailedWorkflowInSlack/action.yml b/.github/actions/composite/announceFailedWorkflowInSlack/action.yml index 4069db93e1dd..67d6c691a3b6 100644 --- a/.github/actions/composite/announceFailedWorkflowInSlack/action.yml +++ b/.github/actions/composite/announceFailedWorkflowInSlack/action.yml @@ -5,6 +5,10 @@ inputs: SLACK_WEBHOOK: description: 'URL of the slack webhook' required: true + CHANNEL: + description: 'Slack channel to post announcement in' + required: false + default: '#announce' runs: using: composite @@ -16,7 +20,7 @@ runs: fields: workflow, repo custom_payload: | { - channel: '#announce', + channel: '${{ inputs.CHANNEL }}', attachments: [{ color: "#DB4545", pretext: ``, diff --git a/.github/workflows/publishReactNativeAndroidArtifacts.yml b/.github/workflows/publishReactNativeAndroidArtifacts.yml index da22091fc6af..1283937c60a2 100644 --- a/.github/workflows/publishReactNativeAndroidArtifacts.yml +++ b/.github/workflows/publishReactNativeAndroidArtifacts.yml @@ -144,3 +144,4 @@ jobs: uses: ./.github/actions/composite/announceFailedWorkflowInSlack with: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + CHANNEL: '#expensify-open-source'