Skip to content

Commit

Permalink
Upgraded the ship Workflow to support #pass2ship
Browse files Browse the repository at this point in the history
  • Loading branch information
CatChen committed Sep 1, 2022
1 parent b035fad commit 527556b
Showing 1 changed file with 59 additions and 4 deletions.
63 changes: 59 additions & 4 deletions .github/workflows/ship.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,65 @@
name: Accept to Ship
name: Ship

on:
pull_request:
types: [synchronize]
branches: [master]
types:
[
labeled,
unlabeled,
edited,
closed,
reopened,
synchronize,
review_requested,
review_request_removed,
]
pull_request_review:
types: [submitted, edited]
types: [submitted, edited, dismissed]
check_run:
type: [created, rerequested, completed]
check_suite:
types: [completed]
workflow_run:
branches: ['[0-9]+-[0-9]+-*']
workflows: ['Node.js CI', 'CodeQL']
types: [completed]

concurrency:
group: ${{ github.event.pull_request.number || github.workflow }}
cancel-in-progress: true

jobs:
ship:
accept-to-ship:
name: Accept to Ship
if: |-
${{
github.base_ref == 'master' ||
github.event.pull_request.base.ref == 'master' ||
contains(github.event.check_run.pull_requests.*.base.ref, 'master') ||
contains(github.event.check_suite.pull_requests.*.base.ref, 'master') ||
contains(github.event.workflow_run.pull_requests.*.base.ref, 'master')
}}
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v3

- uses: CatChen/[email protected]
with:
merge-method: squash
timeout: 0

pass-to-ship:
name: Pass to Ship
if: |-
${{
github.base_ref == 'master' ||
github.event.pull_request.base.ref == 'master' ||
contains(github.event.check_run.pull_requests.*.base.ref, 'master') ||
contains(github.event.check_suite.pull_requests.*.base.ref, 'master') ||
contains(github.event.workflow_run.pull_requests.*.base.ref, 'master')
}}
runs-on: ubuntu-latest
permissions: write-all
steps:
Expand All @@ -16,3 +68,6 @@ jobs:
- uses: CatChen/[email protected]
with:
merge-method: squash
timeout: 0
request-zero-accept-zero: true
custom-hashtag: '#pass2ship'

0 comments on commit 527556b

Please sign in to comment.