Skip to content

Commit

Permalink
Merge pull request #191699 from Homebrew/remove-disabled-packages-cre…
Browse files Browse the repository at this point in the history
…ate-or-update-issue

workflows/remove-disabled-packages: use `create-or-update-issue` action
  • Loading branch information
MikeMcQuaid authored Sep 24, 2024
2 parents 2750243 + 59fbb4c commit 2a76aae
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/remove-disabled-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,18 @@ jobs:

create-issue:
permissions:
issues: write # for `gh issue create`
issues: write # for Homebrew/actions/create-or-update-issue
needs: remove-disabled-packages
if: failure()
if: always()
runs-on: ubuntu-latest
steps:
- name: Create issue on failure
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
gh issue create \
--title 'Disabled package removal failed' \
--body "Run failed at $RUN_URL" \
--label 'bug,help wanted' \
--repo "$GITHUB_REPOSITORY"
uses: Homebrew/actions/create-or-update-issue@master
with:
title: Disabled package removal failed
body: Run failed at ${{ env.RUN_URL }}
labels: bug,help wanted
update-existing: ${{ needs.remove-disabled-packages.result == 'failure' }}
close-existing: ${{ needs.remove-disabled-packages.result == 'success' }}
close-from-author: github-actions[bot]
close-comment: Run succeeded at ${{ env.RUN_URL }}, closing issue.

0 comments on commit 2a76aae

Please sign in to comment.