Sentry/.github/workflows/fast-revert.yml
小草林(田梓萱) 90db12dfc0
Some checks failed
Lock closed issues/PRs / lock (push) Has been cancelled
Test / Sentry self-hosted end-to-end tests (push) Has been cancelled
Test / unit tests (push) Has been cancelled
Test / Sentry upgrade test (push) Has been cancelled
Test / integration test v2.19.0 - customizations disabled (push) Has been cancelled
Test / integration test v2.19.0 - customizations enabled (push) Has been cancelled
Test / integration test v2.26.0 - customizations disabled (push) Has been cancelled
Test / integration test v2.26.0 - customizations enabled (push) Has been cancelled
feat: sentry for arm
Signed-off-by: 小草林(田梓萱) <xcl@xuegao-tzx.top>
2025-01-11 23:13:34 +08:00

41 lines
1.5 KiB
YAML

on:
pull_request_target:
types: [labeled]
workflow_dispatch:
inputs:
pr:
required: true
description: pr number
co_authored_by:
required: true
description: '`name <email>` for triggering user'
# disable all permissions -- we use the PAT's permissions instead
permissions: {}
jobs:
revert:
runs-on: ubuntu-latest
if: |
github.event_name == 'workflow_dispatch' || github.event.label.name == 'Trigger: Revert'
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.BUMP_SENTRY_TOKEN }}
- uses: getsentry/action-fast-revert@v2.0.1
with:
pr: ${{ github.event.number || github.event.inputs.pr }}
co_authored_by: ${{ github.event.inputs.co_authored_by || format('{0} <{1}+{0}@users.noreply.github.com>', github.event.sender.login, github.event.sender.id) }}
committer_name: getsentry-bot
committer_email: bot@sentry.io
token: ${{ secrets.BUMP_SENTRY_TOKEN }}
- name: comment on failure
run: |
curl \
--silent \
-X POST \
-H 'Authorization: token ${{ secrets.BUMP_SENTRY_TOKEN }}' \
-d'{"body": "revert failed (conflict? already reverted?) -- [check the logs](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})"}' \
https://api.github.com/repositories/${{ github.event.repository.id }}/issues/${{ github.event.number || github.event.inputs.pr }}/comments
if: failure()