Rebase #33
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: 'Rebase' | |
on: | |
workflow_call: | |
inputs: | |
base: | |
type: string | |
required: false | |
default: 'main' | |
target: | |
type: string | |
required: false | |
default: 'develop' | |
workflow_dispatch: | |
inputs: | |
base: | |
type: string | |
description: 'Base branch' | |
default: 'develop' | |
required: true | |
target: | |
type: string | |
description: 'Target branch to update' | |
default: 'main' | |
required: true | |
repository_dispatch: | |
types: [ rebase-command ] | |
concurrency: | |
group: rebase-${{ github.event.client_payload.target || github.event.inputs.target || inputs.target }} | |
cancel-in-progress: true | |
jobs: | |
rebase: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
token: ${{ secrets.GH_REPO_TOKEN }} | |
# TODO: Switch to v3 with app credentials when GitHub apps are allowed to bypass status checks. https://github.com/orgs/community/discussions/43460 | |
- uses: myparcelnl/actions/setup-git-credentials@v2 | |
with: | |
token: ${{ secrets.GH_REPO_TOKEN }} | |
- uses: myparcelnl/actions/rebase@v3 | |
with: | |
token: ${{ secrets.GH_REPO_TOKEN }} | |
target: ${{ github.event.client_payload.target || github.event.inputs.target || inputs.target }} | |
base: ${{ github.event.client_payload.base || github.event.inputs.base || inputs.base }} |