Ship #11393
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ship | |
on: | |
pull_request: | |
branches: [main] | |
types: | |
[ | |
labeled, | |
unlabeled, | |
edited, | |
closed, | |
reopened, | |
synchronize, | |
review_requested, | |
review_request_removed, | |
] | |
pull_request_review: | |
types: [submitted, edited, dismissed] | |
check_run: | |
types: [created, rerequested, completed] | |
check_suite: | |
types: [completed] | |
workflow_run: | |
branches: ['[0-9]+-[0-9]+-*'] | |
workflows: ['Build', 'Test', 'ESLint', 'CodeQL'] | |
types: [completed] | |
concurrency: | |
group: |- | |
${{ | |
github.event.pull_request.number || | |
join(github.event.check_run.pull_requests.*.number, ', ') || | |
join(github.event.check_suite.pull_requests.*.number, ', ') || | |
join(github.event.workflow_run.pull_requests.*.number, ', ') || | |
github.sha || | |
github.ref | |
}} | |
jobs: | |
concurrency-group: | |
name: Concurrency group | |
runs-on: ubuntu-latest | |
steps: | |
- name: Concurrency group | |
env: | |
CONCURRENCY_GROUP: |- | |
${{ | |
github.event.pull_request.number || | |
join(github.event.check_run.pull_requests.*.number, ', ') || | |
join(github.event.check_suite.pull_requests.*.number, ', ') || | |
join(github.event.workflow_run.pull_requests.*.number, ', ') || | |
github.sha || | |
github.ref | |
}} | |
run: | | |
echo "::notice::Concurrency group is $CONCURRENCY_GROUP" | |
accept-to-ship: | |
name: Accept to Ship | |
if: |- | |
${{ | |
github.base_ref == 'main' || | |
github.event.pull_request.base.ref == 'main' || | |
contains(github.event.check_run.pull_requests.*.base.ref, 'main') || | |
contains(github.event.check_suite.pull_requests.*.base.ref, 'main') || | |
contains(github.event.workflow_run.pull_requests.*.base.ref, 'main') | |
}} | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
contents: write | |
outputs: | |
skipped: ${{ steps.ship.outputs.skipped }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: getsentry/action-github-app-token@v3 | |
id: get-github-app-token | |
with: | |
app_id: ${{ secrets.ACCEPT_TO_SHIP_BOT_APP_ID }} | |
private_key: ${{ secrets.ACCEPT_TO_SHIP_BOT_APP_PRIVATE_KEY }} | |
- id: ship | |
uses: ./ | |
with: | |
github-token: ${{ steps.get-github-app-token.outputs.token }} | |
merge-method: squash | |
timeout: 0 | |
pass-to-ship: | |
name: Pass to Ship | |
if: |- | |
${{ | |
github.base_ref == 'main' || | |
github.event.pull_request.base.ref == 'main' || | |
contains(github.event.check_run.pull_requests.*.base.ref, 'main') || | |
contains(github.event.check_suite.pull_requests.*.base.ref, 'main') || | |
contains(github.event.workflow_run.pull_requests.*.base.ref, 'main') | |
}} | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
contents: write | |
outputs: | |
skipped: ${{ steps.ship.outputs.skipped }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: getsentry/action-github-app-token@v3 | |
id: get-github-app-token | |
with: | |
app_id: ${{ secrets.ACCEPT_TO_SHIP_BOT_APP_ID }} | |
private_key: ${{ secrets.ACCEPT_TO_SHIP_BOT_APP_PRIVATE_KEY }} | |
- id: ship | |
uses: ./ | |
with: | |
github-token: ${{ steps.get-github-app-token.outputs.token }} | |
merge-method: squash | |
timeout: 0 | |
request-zero-accept-zero: true | |
custom-hashtag: '#pass2ship' |