Skip to content

Update orphan.yml

Update orphan.yml #4

Workflow file for this run

name: generate empty branch
on:
repository_dispatch:
workflow_dispatch:
push:
branches: orphan
jobs:
empty_branch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: firmware
- name: Create new empty firmware branch
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git switch --orphan new_branch # create empty branch
git commit --allow-empty -m "Initial commit"
git push -u origin new_branch # push empty branch in repo
git switch firmware
git reset --hard new_branch # reset firmware branch
git push origin firmware -f
git push origin --delete new_branch # delete empty_branch