1
0
mirror of synced 2025-12-30 12:02:01 -05:00

Skip indexing portion if a workflow_run was not successful (#49941)

This commit is contained in:
Peter Bengtsson
2024-03-29 12:42:10 -04:00
committed by GitHub
parent cc95552069
commit c471edcdc2

View File

@@ -58,7 +58,9 @@ jobs:
if (context.payload.workflow_run.conclusion === "success") {
return ["en"]
}
throw new Error(`It was a workflow_run but not success ('${context.payload.workflow_run.conclusion}')`)
console.warn(`NOTE! It was a workflow_run but not success ('${context.payload.workflow_run.conclusion}')`)
console.warn("This means we're not going to index anything in the next dependent step.")
return []
}
if (context.eventName === "workflow_dispatch") {
@@ -95,7 +97,7 @@ jobs:
updateElasticsearchIndexes:
needs: figureOutMatrix
name: Update indexes
if: ${{ github.repository == 'github/docs-internal' }}
if: ${{ github.repository == 'github/docs-internal' && needs.figureOutMatrix.outputs.matrix != '[]' }}
runs-on: ubuntu-20.04-xl
strategy:
fail-fast: false