Merge pull request #226 from MariachiBear/fix/cors #17
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 to master | |
on: | |
push: | |
branches: | |
- master | |
workflow_call: | |
inputs: | |
branch_name: | |
required: true | |
type: string | |
jobs: | |
rebase: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout to ${{ inputs.branch_name }} | |
if: ${{ inputs.branch_name != 0 }} | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ inputs.branch_name }} | |
- name: Checkout to dependencies | |
if: ${{ inputs.branch_name == 0 }} | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: dependencies | |
- name: Rebase branch to ${{ github.event.repository.default_branch }} | |
env: | |
BRANCH_NAME: ${{ inputs.branch_name }} | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git rebase origin/${{ github.event.repository.default_branch }} | |
[ -z $BRANCH_NAME ] && git push origin dependencies --force || git push origin $BRANCH_NAME --force |