Skip to content

Commit

Permalink
Automatically close weekly ci issue if weekly ci succeeds
Browse files Browse the repository at this point in the history
  • Loading branch information
Brezak committed Feb 24, 2025
1 parent ad3817c commit affbc69
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,24 @@ jobs:
# See tools/ci/src/main.rs for the commands this runs
run: cargo run -p ci -- compile

close-any-open-issues:
runs-on: ubuntu-latest
needs: ['test', 'lint', 'check-compiles']
permissions:
issues: write
steps:
- name: Close issues
run: |
previous_issue_number=$(gh issue list \
--search "$TITLE in:title" \
--json number \
--jq '.[0].number')
if [[ -n $previous_issue_number ]]; then
gh issue close $previous_issue_number \
-r completed \
-c "[Last pipeline run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) successfully completed. Closing issue."
fi
open-issue:
name: Warn that weekly CI fails
runs-on: ubuntu-latest
Expand Down

0 comments on commit affbc69

Please sign in to comment.