Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/automerge-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:

- name: Check the absence period
id: absence
shell: bash
run: |
set -uo pipefail

Expand Down Expand Up @@ -94,6 +95,7 @@ jobs:
DRY_RUN: ${{ inputs.dry_run }}
SUSPENDED: ${{ steps.absence.outputs.suspended }}
SUSPEND_REASON: ${{ steps.absence.outputs.reason }}
shell: bash
run: |
set -uo pipefail

Expand Down Expand Up @@ -244,6 +246,7 @@ jobs:
HELD_LIST: ${{ steps.merge.outputs.held_list }}
FAILED_LIST: ${{ steps.merge.outputs.failed_list }}
JOB_STATUS: ${{ job.status }}
shell: bash
run: |
set -uo pipefail

Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/automerge-eligibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ jobs:
GH_TOKEN: ${{ secrets.PAT_TOKEN_PIWI }}
AUTOMERGE_REPO: ${{ github.repository }}
PR: ${{ github.event.pull_request.number || inputs.pr_number }}
# GitHub runs `run:` blocks as `bash -e` unless told otherwise, and
# `set -uo pipefail` does not undo that. A check exiting 1 is this
# step's normal output — a criterion was violated — so -e would abort
# the run on the first failing check and report the job as broken.
shell: bash
run: |
set -uo pipefail

Expand Down Expand Up @@ -135,7 +140,7 @@ jobs:
for CHECK in "${CHECKS[@]}"; do
OUT=$("$DIR/$CHECK.sh" "$PR" 2>&1)
CODE=$?
DETAIL=$(echo "$OUT" | head -1 | sed 's/^\(PASS\|FAIL\|UNKNOWN\): //' | cut -c1-90)
DETAIL=$(echo "$OUT" | head -1 | sed -E 's/^(PASS|FAIL|UNKNOWN): //' | cut -c1-90)

case "$CODE" in
0) ICON="✅" ;;
Expand Down Expand Up @@ -170,6 +175,7 @@ jobs:
GH_TOKEN: ${{ secrets.PAT_TOKEN_PIWI }}
PR: ${{ github.event.pull_request.number || inputs.pr_number }}
ELIGIBLE: ${{ steps.checks.outputs.eligible }}
shell: bash
run: |
set -uo pipefail

Expand Down Expand Up @@ -216,6 +222,7 @@ jobs:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_DOCUMENTATION_OPS_CHANNEL_ID }}
PR: ${{ github.event.pull_request.number || inputs.pr_number }}
shell: bash
run: |
set -uo pipefail

Expand Down
Loading