Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switched ship workflow to use bot token #764

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .github/workflows/ship.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
pull_request_review:
types: [submitted, edited, dismissed]
check_run:
type: [created, rerequested, completed]
types: [created, rerequested, completed]
check_suite:
types: [completed]
workflow_run:
Expand Down Expand Up @@ -56,6 +56,7 @@ jobs:
echo "::notice::Concurrency group is $CONCURRENCY_GROUP"

accept-to-ship:
needs: concurrency-group
name: Accept to Ship
if: |-
${{
Expand All @@ -68,14 +69,24 @@ jobs:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/create-github-app-token@v1
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 }}

- uses: actions/checkout@v4
with:
token: ${{ steps.get-github-app-token.outputs.token }}

- uses: CatChen/[email protected]
with:
github-token: ${{ steps.get-github-app-token.outputs.token }}
merge-method: squash
timeout: 0

pass-to-ship:
needs: concurrency-group
name: Pass to Ship
if: |-
${{
Expand All @@ -88,10 +99,19 @@ jobs:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/create-github-app-token@v1
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 }}

- uses: actions/checkout@v4
with:
token: ${{ steps.get-github-app-token.outputs.token }}

- uses: CatChen/[email protected]
with:
github-token: ${{ steps.get-github-app-token.outputs.token }}
merge-method: squash
timeout: 0
request-zero-accept-zero: true
Expand Down
Loading