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 30c2f05ecd61..1283937c60a2 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,10 @@ 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 }} + CHANNEL: '#expensify-open-source'